Modsak Manual - Troubleshooting

Troubleshooting

Introduction

This section provides information on various errors that can occur when using Modsak, and suggests ways of tackling them.

Entry headings in quotes are messages that are displayed in Modsak's status bar or trace window. 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 trace window (or move to the message and press the space bar).

Communications

General

"Connection closed"

  • Click the Run button to open the connection.

  • In master mode, if you have lost the connection to the slave check that the slave is still running and listening.

"Error response: ..."

In master mode, Modsak received an error response from the slave.

In slave mode, an error response was generated by Modsak. The response may not actually have been sent to the master if the request was a broadcast - see the Responses setting.

  • 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 trace window.

"Invalid data received: ..."

Data was received by Modsak 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 trace window.

"Discarded: ..."

This message is displayed in the trace window when data is received by Modsak 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 trace 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.

Socket Communications

"Unknown host: XXX"

The host name that you entered could not be mapped to an IP address.

  • If you are using master mode, check that the Host is consistent with the slave.

  • If you are using slave mode, the address of the Host can be 'localhost' if the slave and master are on the same machine, or can be left empty to accept connections via any network interface. Otherwise check with your System Administrator for the address of your machine.

  • Check that your DNS server is working and reachable.

"Can't listen on port YYY"

"Can't listen on interface XXX port YYY"

  • Check that the Port is not in use by any other server.

  • If Modsak is run under a Unix/Linux operating system by an ordinary user (not super-user) then the Port needs to be above 1023 and the Modbus master should be configured to use that port.

  • The address of the Host can be 'localhost' if the slave and master are on the same machine, or can be left empty to accept connections via any network interface. Otherwise check with your System Administrator for the IP address of your machine's interface.

"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.

  • Check that the Host and Port are consistent with the slave.

  • Check that slave is listening.

"UDP Port Unreachable"

It was not possible to deliver a UDP message.

  • Check that the Host and Port are consistent with the slave.

  • Check that slave is listening.

"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.

"Timed out"

A request was sent to the slave, but no response was received.

  • Turn on tracing to get more information.

  • Check that the Packet Type is consistent with the slave. The packet type is usually TCP for a socket connection.

  • Check that the Slave ID is consistent with the slave.

  • 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, check that the Always responds setting is consistent with the slave.

No response from Modsak to master request

  • Turn on tracing to get more information - in particular, to see if Modsak received the request.

  • Check that Packet Type is consistent with the master. The packet type is usually TCP for a socket connection.

  • Check that Slave ID is consistent with the master.

  • Check that the master is correctly configured to send the request to Modsak.

"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

"Serial comms not available"

Serial communications is not supported on the system you are using.

"No serial port specified"

  • You must select or enter a port name in the interface panel.

"Can't open serial port"

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 speed"

"Can't set serial data bits"

"Can't set serial stop bits"

"Can't set serial parity"

"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.

"Parity error"

A parity error occurred when receiving data via the serial port.

"Framing error"

A framing error occurred when receiving data via the serial port.

"Overrun error"

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 Modsak.

"Timed out"

A request was sent to the slave, but no response was received.

  • Turn on tracing to get more information.

  • Check that the Packet Type is consistent with the slave. The packet type is usually RTU or ASCII for a serial connection.

  • Check that the Slave ID is consistent with the slave.

  • If the master and slave are on same machine, check that the ports are different.

  • Check that the Speed, Parity, Data bits, Stop bits and RTS control settings are consistent with the slave.

  • Check that a cable is connecting master and slave interfaces.

  • If using RTS control: Flow control check that the cable is appropriately wired.

  • Check that no other software is using the same port.

  • If you sent a broadcast request, check that the Always responds setting is consistent with the slave.

No response from Modsak to master request

  • Turn on tracing to get more information - in particular, to see if Modsak received the request.

  • Check that Packet Type is consistent with the master. The packet type is usually RTU or ASCII for a serial connection.

  • Check that the Slave ID is consistent with the master.

  • If the master and slave are on same machine, check that the ports are different.

  • Check that the Speed, Parity, Data bits, Stop bits and RTS control settings are consistent with the master.

  • Check that a cable is connecting master and slave interfaces.

  • If using RTS control: Flow control check that the cable is appropriately wired.

  • Check that no other software is using the same port.

RTU Packet Type

"Invalid CRC"

Data received by Modsak failed the CRC check.

  • Turn on tracing to get more information.

  • If using serial communications, check that Speed, Parity, Data bits and Stop bits are all set correctly.

  • Try increasing the EOM Timeout setting - messages may be getting fragmented by long delays introduced by the comms link or the operating system.

"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).

  • Turn on tracing to get more information.

  • If using serial communications, check that Speed, Parity, Data bits and Stop bits are all set correctly.

  • Try increasing the EOM Timeout setting - messages may be getting fragmented by long delays introduced by the comms link or the operating system.

"Message too long (> XXX bytes)"

A received message was too long to fit in Modsak's input buffer.

  • Turn on tracing to get more information.

  • If using serial communications, check that Speed, Parity, Data bits and Stop bits are all set correctly.

  • Check that your master is not attempting to "pipeline" requests (i.e. send a request when it has not yet received a response to a previous request). Pipelining is only possible when using the TCP packet type.

ASCII Packet Type

"No ':' at start of message"

"':' in middle of message"

"LF terminator missing"

"Invalid message length (XXX bytes) - should be odd"

"Non-hex character in message"

"Invalid LRC"

Data received by Modsak was not correctly formatted as an ASCII message.

"Message too short (XXX bytes)"

An ASCII message must be at least 9 bytes long.

  • Turn on tracing to get more information.

  • If using serial communications, check that Speed, Parity, Data bits and Stop bits are all set correctly.

  • Try increasing the EOM Timeout setting - messages may be getting fragmented by long delays introduced by the comms link or the operating system.

"Message too long (> XXX bytes)"

A received message was too long to fit in Modsak's input buffer.

  • Turn on tracing to get more information.

  • If using serial communications, check that Speed, Parity, Data bits and Stop bits are all set correctly.

  • Check that your master is not attempting to "pipeline" requests (i.e. send a request when it has not yet received a response to a previous request). Pipelining is only possible when using the TCP packet type.

TCP Packet Type

"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.

"Length (XXX) too small"

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.

Master Mode

Value is read from or written to address in slave that is wrong but near to address in command

  • Check that the address mapping is consistent with the slave.

  • 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.

  • If you are using polling or a high-level command, try a low-level command (e.g. CommandRead Holding Registers) 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.

  • If you are using polling or a high-level command, try a low-level command (e.g. CommandRead Holding Registers) to get more information.

"Unexpected"

Unexpected data was received by Modsak when it was about to send a request message.

  • The data may be a delayed response to an earlier request sent by Modsak (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.

"Invalid read count (XXX) - response byte count (XXX) would not fit in a byte"

The read request that you are attempting to send contains a 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 read request that you are attempting to send contains a count that is too large. The response would exceed the arbitrary limit on the PDU size.

"Invalid read count (XXX) - response would exceed count limit (XXX bytes)"

The read request that you are attempting to send contains a count that is too large. The response would exceed the arbitrary count limit (interpreted as a limit on the number of data bytes) imposed by the current Modbus specification.

"Invalid write count (XXX) - byte count (XXX) would not fit in a byte"

The write request that you are attempting to send contains a 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 write request that you are attempting to send contains a count that is too large. The request would exceed the arbitrary limit on the PDU size.

"Invalid write count (XXX) - request would exceed count limit (XXX bytes)"

The write request that you are attempting to send contains a count that is too large. The response would exceed the arbitrary count limit (interpreted as a limit on the number of data bytes) imposed by the current Modbus specification.

"Count (XXX) exceeds count limit (XXX)"

The Coil/Discrete-Input request that you are attempting to send contains a count that exceeds the arbitrary count limit imposed by the current Modbus specification.

"Error response: Illegal data address"

The slave has sent an exception response indicating that the address in the command sent by Modsak was incorrect.

If you are using polling or a high-level command:

  • Check that the slave has registers corresponding to the registers defined in Modsak.

  • Check that the addresses of the registers defined in Modsak are consistent with the slave.

  • Check that the address mapping is consistent with the slave.

  • Check that the slave allows the registers to be written, if you are trying to write.

  • Turn on tracing to see if the correct low-level command is being sent. If not, check that the registers defined in Modsak are in the correct address ranges.

  • Try a low-level command (e.g. CommandRead Holding Registers) to get more information.

If you are using a low-level command:

  • Check that the address you have entered is a message address and not a model address.

  • Check that the slave has a Holding-register/Input-register/Coil/Discrete-input at the Address you have entered.

  • Check that the slave has enough consecutive addresses for the Count you have entered.

  • Check that the slave allows the registers/coils to be written, if you are trying to write.

"Error response: Illegal data value"

The slave has sent an exception response indicating that data in the command sent by Modsak 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 Modsak and the slave disagree over how to interpret the count in the Modbus message, then the number of bytes written by Modsak may be different from what the slave is expecting.

If you are using polling or a high-level command:

  • Check that the Count you have entered does not exceed the maximum supported by the slave (not relevant if polling).

  • Check that the Types of the registers defined in Modsak are consistent with the slave.

  • Try a low-level command (e.g. CommandWrite Multiple Holding Registers) to get more information.

If you are using a low-level command:

  • Check that the Type is consistent with the slave.

  • Check that the Count you have entered does not exceed the maximum supported by the slave.

"Error response: Illegal function"

The slave has sent an exception response indicating that the function code in the command sent by Modsak is not supported.

"Error response: Server failure"

"Error response: Acknowledge"

"Error response: Server busy"

"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 Modsak 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 Modsak 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 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 value in response"

"Wrong masks in response"

"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 Modsak sent in the request.

  • Turn on tracing to get more information.

  • Check that your slave is functioning correctly.

  • If you want Modsak 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 Modsak 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 Modsak 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 Modsak 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 Modsak sent in the request.

  • Turn on tracing to get more information.

  • Check that your slave is functioning correctly.

  • If you want Modsak to accept the response even though it is incorrect, you could deselect Strict Checking.

Slave Mode

Wrong value is displayed when written to by the master

  • Check that the Type is consistent with the master.

  • If you are using 32 or 64 bit values, check that the Little-Endian and Word Registers settings are consistent with the master.

Master receives: 'Illegal data address' error from Modsak

  • Turn on tracing to get more information about the master's request and to see Modsak's explanation of the response.

  • Check that Modsak has a register defined at the correct address for the master request.

  • Check that the address of the Modsak register is within the range defined (see Address mapping) for the Modbus type of the master request (e.g. is in the Coil range for a Read Coils command).

  • If the master request is for more than one register, check that there are enough Modsak registers defined (see Register display).

  • If the master request is for more than one register, check that the Modsak register addresses are consecutive on the register display. However, if you are using 32/64-bit values and Word Registers is selected, then not all consecutive addresses are displayed.

  • If the master sent a write request, check that the Write checkbox for the register is selected in the register display.

Master receives "Illegal data value" error from Modsak

  • Turn on tracing to get Modsak's explanation of the response.

  • Check that the Types of the registers being transferred are consistent with the master.

  • If you are using 32 or 64 bit values, check that Word Count setting is consistent with the master.

"Error response: ..."

An error response was generated by Modsak in response to a received request. The response may not actually have been sent to the master (e.g. if the request was a broadcast) - see the Responses setting.

  • The rest of the message explains why the error response was generated. See the troubleshooting entry for the rest of the message for further information.

  • If tracing is turned on, you can view the received request in the trace window.

"Response not sent: Request was broadcast"

Modsak did not respond to the request from the master because the request was a broadcast. See the Responses setting for more information.

  • If you want Modsak to respond to broadcast requests, you should select the Always Responds setting.

"Response not sent: Exception 10/11"

Modsak did not send a response, because the response would have been an exception 10 or 11. See the Responses setting for more information.

  • If you want Modsak to send exception 10/11 responses, you should select the Always Responds setting.

"Unexpected"

Unexpected data was received by Modsak when it was about to send a response message.

  • Your master may be re-trying a request before Modsak has responded. Check that your master is not using too short a timeout when waiting for a response.

  • Check that your master is not attempting to "pipeline" requests (i.e. send a request when it has not yet received a response to a previous request) when using the RTU or ASCII packet type. Pipelining is only possible when using the TCP packet type.

  • Turn on tracing to get more information.

"Request PDU size incorrect: XXX instead of XXX"

The PDU size of a received request was not correct for the function code specified in the request. If the request included a byte count (e.g. a Write Multiple Holding Registers request) then the PDU size is inconsistent with the byte count. If the request did not include a byte count (e.g. a Read Holding Registers request), then the PDU size was not the expected fixed size.

  • Turn on tracing to get more information.

  • Check that your master is functioning correctly.

"Request PDU too short: XXX when it should be at least XXX"

The PDU size of a received request was not big enough to contain all the fields required for the function code specified in the request.

  • Turn on tracing to get more information.

  • Check that your master is functioning correctly.

"Wrong slave ID: XXX instead of XXX"

The master sent a request containing a slave ID that does not match Modsak's configured slave ID. This response may not actually have been sent to the master - see the Responses setting.

  • Turn on tracing to get more information.

  • If Modsak is being used in an RS485 "multi-drop" setup, then the request was presumably intended for another slave and Modsak is correctly ignoring it.

  • Otherwise, check that the Slave ID setting is consistent with the master.

"In listen-only mode"

A request was received from the master when the master had already put Modsak into listen-only mode by sending a "Diagnostics - Force Listen Only Mode" (function code 8, sub-function 04) request. If the request was a "Diagnostics - Restart Communications Option" (function code 8, sub-function 01) command, then Modsak will have come out of listen-only mode. Any other request will have been ignored. This response will not normally have been sent to the master - see the Responses setting.

  • Turn on tracing to get more information.

  • The master will have to send a "Diagnostics - Restart Communications Option" (function code 8, sub-function 01) command to bring Modsak out of listen-only mode.

  • You can also bring Modsak out of listen-only mode by closing and re-opening the connection (i.e. click the Run button twice).

"Function XXX not supported"

The master sent a request containing an unsupported function code.

  • Turn on tracing to get more information.

"Unknown sub-function (XXX)"

The master sent a Diagnostics (function code 8) request containing an unsupported sub-function code.

  • Turn on tracing to get more information.

"Can't mask float value (register XXX)"

The master sent a "Mask Write Register" (function code 22) request for a register containing a floating-point value. This is not allowed by Modsak.

  • Turn on tracing to get more information.

"Can't mask discrete value (register XXX)"

The master sent a "Mask Write Register" (function code 22) request for a register containing a "discrete" (1-bit integer) value. This is not allowed by Modsak.

  • Turn on tracing to get more information.

"Invalid Read Device ID code: XXX"

The master sent a "Read Device Identification" (function code 43/14) request containing an invalid Read Device ID code. The only valid codes are 01, 02, 03 and 04.

  • Turn on tracing to get more information.

  • Check that your master is functioning correctly.

"Invalid object ID: XXX"

The master sent an individual-access "Read Device Identification" (function code 43/14, read device ID code 04) request for an undefined object ID.

"Invalid count (0)"

"Invalid read count (0)"

"Invalid write count (0)"

The master sent a request containing a zero count. The current Modbus specification does not allow this.

  • Turn on tracing to get more information.

  • Check that your master is functioning correctly.

  • If you want Modsak to accept the request even though it is incorrect, you could deselect Strict Checking.

"Invalid count (XXX) - response byte count (XXX) would not fit in a byte"

"Invalid read count (XXX) - response byte count (XXX) would not fit in a byte"

The master sent a read request containing a count that was 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.

  • 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 consistent with the master.

  • If your master 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 response to be sent.

  • Check that your master is functioning correctly.

"Invalid count (XXX) - response would exceed max PDU size (XXX bytes)"

"Invalid read count (XXX) - response would exceed max PDU size (XXX bytes)"

The master sent a read request containing a count that was too large. The response would exceed the arbitrary limit on the PDU size.

"Invalid count (XXX) - response would exceed count limit (XXX bytes)"

"Invalid read count (XXX) - response would exceed count limit (XXX bytes)"

The master sent a read request containing a count that was too large. The response would exceed the arbitrary count limit (interpreted as a limit on the number of data bytes) imposed by the current Modbus specification.

"Number of data bytes (XXX) exceeds count limit (XXX bytes)"

"Number of bytes to write (XXX) exceeds count limit (XXX bytes)"

The master sent a write request containing a count that exceeded the arbitrary count limit (interpreted as a limit on the number of data bytes) imposed by the current Modbus specification.

"Count (XXX) does not match number of data bytes (XXX)"

"Write count (XXX) does not match number of data bytes (XXX)"

The master sent a write request containing a count that was inconsistent with the number of data bytes 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 consistent with the master.

  • Check that the sizes of the registers being transferred are consistent with the master.

  • Check that your master is functioning correctly.

  • If you want Modsak to accept the request even though it is incorrect, you could deselect Strict Checking.

"Count (XXX) exceeds count limit (XXX)"

The master sent a Coil/Discrete-Input request containing a count that exceeded the arbitrary count limit imposed by the current Modbus specification.

"Number of coils (XXX) does not match byte count (XXX)"

The master sent a "Write Multiple Coils" (function code 15) request containing a count that was inconsistent with the byte count in the request. The number of bytes should equal the coil count divided by 8 (rounded up to the nearest integer).

  • Turn on tracing to get more information.

  • Check that your master is functioning correctly.

  • If you want Modsak to accept the request even though it is incorrect, you could deselect Strict Checking.

"Value should be 0000 or FF00"

The master sent a "Write Single Coil" (function code 5) request containing an invalid value. Although the request uses a 16-bit field to contain the value to be written, the current Modbus specification only allows two possible values.

  • Turn on tracing to get more information.

  • Check that your master is functioning correctly.

  • If you want Modsak to accept the request even though it is incorrect, you could deselect Strict Checking.

"No Holding Register at model address XXX (message address XXX)"

"No Input Register at model address XXX (message address XXX)"

"No Coil at model address XXX (message address XXX)"

"No Discrete Input at model address XXX (message address XXX)"

The master sent a request containing an address that mapped to a model address for which no register has been defined.

  • Turn on tracing to get more information.

  • Check that the address and count (if any) sent by the master are correct.

  • Check that the address mapping is consistent with the master.

  • Add a register definition for the requested model address, if required.

"Message address XXX is not in the Holding Register range"

"Message address XXX is not in the Input Register range"

"Message address XXX is not in the Coil range"

"Message address XXX is not in the Discrete Input range"

The master sent a request containing an address that was not in the range defined for the function code in the request.

  • Turn on tracing to get more information.

  • Check that the address and count (if any) sent by the master are correct.

  • Check that the address mapping is consistent with the master.

"Register XXX (message address XXX) is not writable"

The master sent a write request containing an address that mapped to a read-only register.

  • Select the Write option for the register, if required.

  • Turn on tracing to get more information.

  • Check that the address and count (if any) sent by the master are correct.

  • Check that the address mapping is consistent with the master.

"Transfer ends in middle of register XXX (message address XXX)"

The master sent a request that ends in the middle of a register. Modsak does not allow reads or writes of part of a 32 or 64 bit register - the whole register must be read or written.

  • Turn on tracing to get more information.

  • Check that the address and count (if any) sent by the master are correct.

  • Check that the sizes of the registers being transferred are consistent with the master.

  • Check that the Word Registers and Word Count settings are consistent with the master.

"No exception status register"

The master sent a "Read Exception Status" (function code 7) request, but no exception status register mapping has been defined.

"No diagnostic register"

The master sent a "Diagnostics - Return Diagnostic Register" (function code 8, sub-function 2) request, but no diagnostic register mapping has been defined.

Monitor Mode

The Master Mode and Slave Mode sections are also relevant.

Values displayed by Modsak not changing

  • Check that the Slave ID is correct.

  • Check that the registers defined in Modsak are consistent with the slave.

  • Check that the address mapping is consistent with the slave (SettingsAddress Mapping).

  • Turn on tracing to get more information.

No messages in trace window

  • Check that you have turned on tracing.

  • Check that the master is connecting to Modsak and not directly to the slave.

Miscellaneous

"Inconsistent sizes for coils"

Only one size of register (e.g. 1-bit, 32-bit) is allowed within the address range defined for Coils (see Address mapping). The Coil address range that you are attempting to define (or load from a file) includes registers with different sizes.

  • If the Coil address range overlays the Input or Holding Registers address range, then registers in the overlayed part are also restricted to one size.

  • If your slave device uses Coils, check that all are defined in Modsak with the same size.

  • If your slave device does not use Coils, set Number of Addresses to 0 in the address map.

"Inconsistent size for coil"

Only one size of register (e.g. 1-bit, 32-bit) is allowed within the address range defined for Coils (see Address mapping). The register that you are attempting to add (or load from a file) has a different size from those already in the address range.

  • If the Coil address range overlays the Input or Holding Registers address range, then registers in the overlayed part are also restricted to one size.

  • If your slave device uses Coils, check that all are defined in Modsak with the same size.

  • If your slave device does not use Coils, set Number of Addresses to 0 in the address map.

"Inconsistent sizes for discrete inputs"

Only one size of register (e.g. 1-bit, 32-bit) is allowed within the address range defined for Discrete Inputs (see Address mapping). The Discrete Inputs address range that you are attempting to define (or load from a file) includes registers with different sizes.

  • If the Discrete Input address range overlays the Input or Holding Registers address range, then registers in the overlayed part are also restricted to one size.

  • If your slave device uses Discrete Inputs, check that all are defined in Modsak with the same size.

  • If your slave device does not use Discrete Inputs, set Number of Addresses to 0 in the address map.

"Inconsistent size for discrete input"

Only one size of register (e.g. 1-bit, 32-bit) is allowed within the address range defined for Discrete Inputs (see Address mapping). The register that you are attempting to add (or load from a file) has a different size from those already in the address range.

  • If the Discrete Input address range overlays the Input or Holding Registers address range, then registers in the overlayed part are also restricted to one size.

  • If your slave device uses Discrete Inputs, check that all are defined in Modsak with the same size.

  • If your slave device does not use Discrete Inputs, set Number of Addresses to 0 in the address map.

"Address XXX is not in any address range"

The address of the register that you are attempting to add (or load from a file) is not within any address range (see Address mapping).

  • If the register address is correct, check that the appropriate address range includes the address.

  • You must use a "model address" when defining a register, not a "message addess".

"Addresses XXX are not in any address range"

The addresses of the registers that you are attempting to add (or load from a file) are not within any address range (see Address mapping).

  • If the register addresses are correct, check that the appropriate address range includes the addresses.

  • You must use "model addresses" when defining registers, not "message addesses".

"Registers XXX and XXX overlap"

When you select Word Registers each 32-bit and 64-bit register requires more than one address. This error occurs when an extra address required by a 32-bit or 64-bit register is used by another register.

Coils: The value appears not to have been written or has been written to the wrong byte

  • Select/deselect Swap Bytes to make the order of bytes of a 16-bit word consistent with the slave.

Coils/Discrete Inputs: bit values are in reverse order within each byte

  • Select/deselect Reverse Bits to reverse the order and make it consistent with the slave.

Coils/Discrete Inputs: byte values are in reverse order in 16-bit words

  • Select/deselect Swap Bytes to reverse the order and make it consistent with the slave.

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 Modsak to accept the message even though it is incorrect, you could deselect Strict Checking.