ModTest Manual v2.15 - A. Troubleshooting
This section provides information on various errors that can occur when using ModTest, and suggests ways of tackling them.
Entry headings in quotes are messages that are displayed in ModTest's status bar or log output. For other entries, the heading is a description of the symptoms.
The easiest way to find a message in this section is to click on the Error Help button in the status bar (or press the F4 key), or to click on the message in the log window (or move to the message and press the space bar).
Click the Run button to open the connection.
If you have lost the connection to the slave check that the slave is still running and listening.
A request was sent to the slave, but no response was received.
Turn on tracing to get more information. Check whether the response was received late, and increase the Response Timeout if necessary.
Check that the Packet Type is consistent with the slave. The packet type is usually TCP for a socket connection, and RTU or ASCII for a serial connection.
Check that the Slave ID is consistent with the slave.
If using a socket connection, Check that Host and Port are consistent with the slave. You may have sent the request to the wrong slave/server!
If using UDP, check that the slave is running/listening.
If you sent a broadcast request using a non-standard protocol variant, check that the Always responds setting is consistent with the slave.
Check that the Slave ID is consistent with the slave.
If you are using a serial connection and the master and slave are on same machine, check that the ports are different.
If you are using a serial connection, check that the Speed, Parity, Data bits, Stop bits and RTS control settings are consistent with the slave.
If you are using a serial connection, check that a cable is connecting master and slave interfaces!
If you are using a serial connection with RTS control: Flow control check that the cable is appropriately wired.
If you are using a serial connection, check that no other software is using the same port.
ModTest received an error response from the slave.
The rest of the message says what kind of error response. See the troubleshooting entry for the rest of the message for further explanation.
If tracing is turned on, you can view the received message in the log window.
Data was received by ModTest that was unexpected or not correctly formatted as a Modbus message. The received data is discarded without further processing.
The rest of the message says what was wrong with the received data. See the troubleshooting entry for the rest of the message for further explanation.
If tracing is turned on, you can view the received data in the log window.
This message is displayed in the log window when data is received by ModTest that is unexpected or not correctly formatted as a Modbus message. The received data is discarded without further processing.
The rest of the message says what was wrong with the received data. See the troubleshooting entry for the rest of the message for further explanation.
The received data is displayed in the log window preceding the "Discarded" message.
"PDU size (XXX bytes) exceeds maximum (XXX bytes)"
A received message exceeded the arbitrary limit on PDU size. The message is discarded without further processing.
Turn on tracing to get more information.
Increase the Max PDU size if you want to be able to receive longer messages and don't mind not conforming to the current Modbus specification.
The host name that you entered could not be mapped to an IP address.
Check that the Host is consistent with the slave.
Check that your DNS server is working and reachable.
The local host name that you entered could not be mapped to an IP address.
Check that the local host name is correct. Leave the local host field empty if you are not sure.
Check that your DNS server is working and reachable.
The socket could not be bound to the local host and port that you entered.
Check that the Local host corresponds to a network interface on the computer on which ModTest is running.
Check that you are permitted to use the Local port, and that it is not already being used.
"Can't connect to host 'XXX': No route to host"
"Can't connect to host 'XXX': Connect timed out"
The host did not respond to the TCP connection request
Check that the Host is consistent with the slave.
Check that the network is working.
"Can't connect to host 'XXX' port XXX: Connection refused"
The host appears to be reachable and responding, but would not accept the TCP connection request.
It was not possible to deliver a UDP message.
"Error response: No path available to target"
The server/bridge sent a response indicating that the required slave was not reachable.
Check that the Slave ID is consistent with the slave.
Check that your server/bridge is correctly configured for the slave you are trying to reach.
"Error response: Target device failed to respond"
The server/bridge sent a response indicating that the required slave did not respond.
Check that the Slave ID is consistent with the slave.
Check that your server/bridge is correctly configured for the slave you are trying to reach.
Serial communications is not supported on the system you are using.
You must select or enter a port name in the interface page.
The serial port could not be opened and configured correctly.
Check that you have selected/entered the correct serial port name.
On Unix/Linux systems, check that you have read and write access permission to the device file ('/dev/...').
Check that the port is not in use by another program.
"Can't set serial RTS control"
The serial port parameter could not be set.
Check that the serial device supports the parameter value that you are trying to set.
A parity error occurred when receiving data via the serial port.
A framing error occurred when receiving data via the serial port.
An overrun error occurred when receiving data via the serial port. In other words, data was sent faster than it could be received by the machine running ModTest.
Try using hardware flow control, if it is supported.
Try using a slower speed.
Data received by ModTest failed the Cyclic Redundancy Check (CRC).
"Message too short (XXX bytes)"
An RTU message must be at least 4 bytes long (1 byte for the slave ID, 1 byte for the function code, and 2 bytes for the CRC).
"Message too long (> XXX bytes)"
A received message was too long to fit in ModTest's input buffer.
"Invalid message length (XXX bytes) - should be odd"
"Non-hex character in message"
Data received by ModTest was not correctly formatted as an ASCII message.
"Message too short (XXX bytes)"
An ASCII message must be at least 9 bytes long.
"Message too long (> XXX bytes)"
A received message was too long to fit in ModTest's input buffer.
"Incomplete message: only XXX bytes"
A TCP message must be at least 8 bytes long (7 bytes for the header and 1 byte for the function code).
Turn on tracing to get more information.
Try increasing the EOM Timeout setting - messages may be getting fragmented by long delays introduced by the comms link or the operating system.
"Incorrect protocol identifier: XXX"
The protocol identifier in the received message header was not zero.
The value in the length field of the received message header must be at least 2 (1 byte for the slave ID and 1 byte for the function code).
"Incomplete message: only XXX bytes when expecting XXX"
The received message was shorter than indicated by the length field of the header.
Turn on tracing to get more information.
Try increasing the EOM Timeout setting - messages may be getting fragmented by long delays introduced by the comms link or the operating system.
Value is read from or written to address in slave that is wrong but near to address in command
Check that the address that you used in the command is correct.
If you are using 32 or 64 bit registers, check that Word Registers setting is consistent with the slave.
Turn on tracing to get more information.
Wrong value is displayed when reading from slave, or wrong value is written to slave
Check that the register Type is consistent with the slave.
If you are using 32 or 64 bit registers, check that Little-Endian and Word Registers settings are consistent with the slave.
Turn on tracing to get more information.
An unexpected message was received by ModTest.
The message may be a delayed response to an earlier request sent by ModTest (this should be apparent in the trace output). You may need to increase the response timeout setting if the slave or the comms link is slow.
A late response was received by ModTest.
A response to a request sent by ModTest was received after the timeout period. You may need to increase the response timeout setting if the slave or the comms link is slow.
"Invalid read count (XXX) - response byte count (XXX) would not fit in a byte"
The request that you are attempting to send contains a read count that is too large. The response would have to contain more than 255 bytes of data, and the byte count would then not fit into the single byte reserved for it in the response message.
If you think you should be able to send the request and you are using 32 or 64 bit registers, check that the Word Registers and Word Count settings are consistent with the slave.
If your slave can handle messages containing more than 255 data bytes, and you don't mind not conforming to the current Modbus specification, you could select Allow Long Messages to enable the request to be sent.
"Invalid read count (XXX) - response would exceed max PDU size (XXX bytes)"
The request that you are attempting to send contains a read count that is too large. The response would exceed the arbitrary limit on the PDU size.
If you want to send the request and don't mind not conforming to the current Modbus specification, increase the Max PDU Size setting.
"Invalid read count (XXX) - exceeds count limit (XXX bytes)"
The request that you are sending contains a read count that exceeds the arbitrary count limit (interpreted as a limit on the number of data bytes) imposed by the current Modbus specification.
You can suppress this warning by deselecting the Check Count Limits setting.
"Invalid read count (XXX) - will not fit in 16-bits"
The request that you are attempting to send contains a read count that is too large to fit in the 16-bit field of the request message.
The request that you are sending contains a zero read count, which is not allowed by the current Modbus specification.
You can suppress this warning by deselecting the Strict Checking setting.
"Invalid write count (XXX) - byte count (XXX) would not fit in a byte"
The request that you are attempting to send contains a write count that is too large. The request would have to contain more than 255 bytes of data, and the byte count would then not fit into the single byte reserved for it in the request message.
If you think you should be able to send the request and you are using 32 or 64 bit registers, check that the Word Registers and Word Count settings are consistent with the slave.
If your slave can handle messages containing more than 255 data bytes, and you don't mind not conforming to the current Modbus specification, you could select Allow Long Messages to enable the request to be sent.
"Invalid write count (XXX) - request would exceed max PDU size (XXX bytes)"
The request that you are attempting to send contains a write count that is too large. The request would exceed the arbitrary limit on the PDU size.
If you want to send the request and don't mind not conforming to the current Modbus specification, increase the Max PDU Size setting.
"Invalid write count (XXX) - exceeds count limit (XXX bytes)"
The request that you are sending contains a write count that exceeds the arbitrary count limit (interpreted as a limit on the number of data bytes) imposed by the current Modbus specification.
You can suppress this warning by deselecting the Check Count Limits setting.
The request that you are sending contains a zero write count, which is not allowed by the current Modbus specification.
You can suppress this warning by deselecting the Strict Checking setting.
"Invalid write count (XXX) - will not fit in 16-bits"
The request that you are attempting to send contains a write count that is too large to fit in the 16-bit field of the request message.
"Error response: Illegal data address"
The slave has sent an exception response indicating that the address in the command sent by ModTest was incorrect.
"Error response: Illegal data value"
The slave has sent an exception response indicating that data in the command sent by ModTest was incorrect.
Turn on tracing to get more information.
If you are using 32 or 64 bit values check that the Word Count setting is consistent with the slave. If ModTest and the slave disagree over how to interpret the count in the Modbus message, then the number of bytes written by ModTest may be different from what the slave is expecting.
"Error response: Illegal function"
The slave has sent an exception response indicating that the function code in the command sent by ModTest is not supported.
"Error response: Server failure"
"Error response: Memory parity error"
"Error response: Error code XXX"
The slave/bridge/server sent an unexpected error response.
Check that your slave/bridge/server is functioning correctly.
"Wrong transaction ID in response: XXX instead of XXX"
The slave sent a response containing a transaction ID that was different from the transaction ID that ModTest sent in the request. This may have occurred because the slave responded late to an earlier request.
Turn on tracing to get more information.
Increase the Response Timeout in General settings if necessary.
Check that your slave is functioning correctly.
"Wrong function code in response: XXX instead of XXX"
The slave sent a response containing a function code that was different from the function code that ModTest sent in the request. This may have occurred because the slave responded late to an earlier request.
Turn on tracing to get more information.
Increase the Response Timeout in General settings if necessary.
Check that your slave is functioning correctly.
"Response is not echo of request"
"Wrong slave ID in response: XXX instead of XXX"
"Wrong address in response: XXX instead of XXX"
"Wrong count in response: XXX instead of XXX"
"Wrong subfunction in response: XXX instead of XXX"
"Wrong 'MEI Type' in response: XXX instead of 14"
"Wrong 'Read Device ID Code' in response: XXX instead of XXX"
The slave sent a response that did not correctly echo the data that ModTest sent in the request.
Turn on tracing to get more information.
Check that your slave is functioning correctly.
If you want ModTest to accept the response even though it is incorrect, you could deselect Strict Checking.
"Invalid 'Conformity Level' in response: XXX"
The slave sent a 'Read Device Identification' response containing an invalid 'Conformity Level' value. The only valid values are 01, 02, 03, 81, 82 and 83 (in hex).
Turn on tracing to get more information.
Check that your slave is functioning correctly.
If you want ModTest to accept the response even though it is incorrect, you could deselect Strict Checking.
"Invalid 'More Follows' in response: XXX"
The slave sent a 'Read Device Identification' response containing an invalid 'More Follows' value. The only valid values are 00 and FF (in hex). 'More Follows' must be 00 if the 'Read Device ID Code' is 04 (individual access).
Turn on tracing to get more information.
Check that your slave is functioning correctly.
If you want ModTest to accept the response even though it is incorrect, you could deselect Strict Checking.
"Invalid 'Next Object ID' in response: XXX instead of 0"
The slave sent a 'Read Device Identification' response containing an invalid 'Next Object ID' value. The 'Next Object ID' value must be zero if 'More Follows' is zero.
Turn on tracing to get more information.
Check that your slave is functioning correctly.
If you want ModTest to accept the response even though it is incorrect, you could deselect Strict Checking.
"Invalid 'Number of Objects' in response: XXX instead of 1"
The slave sent a 'Read Device Identification' response containing an invalid 'Number of Objects' value. The 'Number of Objects' value must be 1 if the 'Read Device ID Code' is 04 (individual access).
Turn on tracing to get more information.
Check that your slave is functioning correctly.
"Response PDU size incorrect: XXX instead of XXX"
The PDU size of a received response was not correct for the function code specified in the response. If the response included a byte count (e.g. a Read Holding Registers response) then the PDU size is inconsistent with the byte count. If the response did not include a byte count (e.g. a Write Multiple Holding Registers response), then the PDU size was not the expected fixed size.
Turn on tracing to get more information.
Check that your slave is functioning correctly.
"Response PDU too short: XXX when it should be at least XXX"
The PDU size of a received response was not big enough to contain all the fields required for the function code specified in the response.
Turn on tracing to get more information.
Check that your slave is functioning correctly.
"Wrong byte count in response: XXX when expecting XXX"
The byte count in the response sent by the slave is not what was expected for the count that ModTest sent in the request.
Turn on tracing to get more information.
Check that your slave is functioning correctly.
If you want ModTest to accept the response even though it is incorrect, you could deselect Strict Checking.
"Byte count too small: XXX when expecting at least XXX"
The byte count in the response sent by the slave too small for a valid response.
Turn on tracing to get more information.
Check that your slave is functioning correctly.
"Byte count too big: XXX when expecting at most XXX"
The byte count in the response sent by the slave too big for a valid response.
Turn on tracing to get more information.
Check that your slave is functioning correctly.
"Incorrect reference type: XXX instead of 6"
The slave sent a Read File Record (function code 20) response containing an incorrect reference type.
Turn on tracing to get more information.
Check that your slave is functioning correctly.
"Wrong sub-response length: XXX instead of XXX"
The slave sent a Read File Record (function code 20) response containing a sub-response length that does not match the length in the request.
Turn on tracing to get more information.
Check that your slave is functioning correctly.
The slave sent a Read FIFO Queue (function code 24) response containing a queue count greater than 31. A FIFO queue size must be in the range 0 to 31.
Turn on tracing to get more information.
Check that your master is functioning correctly.
"Invalid command: broadcasting a read request"
You are sending a read request with a zero slave ID, which is used to indicate a broadcast request. The Modbus specification only allows write requests to be broadcast.
The 16-bit words of 32 or 64-bit values are in reverse order
Select/deselect Little Endian to reverse the order and make it consistent with the slave.
"Not enough data in message: XXX bytes when expecting XXX"
A received message contains too little data for the count and register sizes specified in the request.
Turn on tracing to get more information.
If you are using 32 or 64 bit registers, check that the Word Registers and Word Count settings are correct.
Check that the Types of the registers being transferred are specified correctly.
"Excess data in message: XXX bytes when expecting XXX"
A received message contains too much data for the count and register sizes specified in the request.
Turn on tracing to get more information.
If you are using 32 or 64 bit registers, check that the Word Registers and Word Count settings are correct.
Check that the Types of the registers being transferred are specified correctly.
If you want ModTest to accept the message even though it is incorrect, you could deselect Strict Checking.