ModMaster Manual v3.11 - 2.1. General settings
Thesettings page enables you to set the following items:
Slave ID. The Slave ID is what is called the "slave address" in the original Modbus specification, and is called the "unit identifier" in the Modbus/TCP specification. It should be in the range 0 to 255.
A zero slave identifier is used in write requests as a broadcast identifier (each slave that receives the message should store the values supplied in the request, but should not normally send a response). The serial specification limits the range of slave identifiers to 0 to 247, for no apparent reason. The Modbus/TCP implementation guide suggests that Modbus/TCP slaves that can be uniquely identified by their IP address should use slave identifier 255.
Number of Retries. The Number of Retries field specifies how many times ModMaster should retry a request that it has not received a response to.
Request Delay. The Request Delay field is used to insert a time delay before each read or write request when polling and when sending a sequence of commands. This delay may be necessary in a 2-wire RS485 RTU setup, to enable slaves to separate master request messages from response messages sent by other other slaves. The delay may also be used to reduce the load on the slave or on the computer running ModMaster. The delay is measured in milliseconds. (Also see Pass Delay.)
Max PDU size. This field specifies the maximum allowable number of bytes in the PDU (Protocol Data Unit) of Modbus messages. You may need to reduce the maximum PDU size when communicating over some networks to avoid fragmentation of messages.
ModMaster will not send any request that exceeds the PDU limit, or whose response would exceed the limit. See the note on message size limits for more information.
Check Count Limits. The current Modbus specification specifies arbitrary limits on the counts in some Modbus requests (e.g. a maximum of 2000 coils in a Read Coils request). Select this checkbox if you want ModMaster to check these limits.
Since ModMaster can handle non-standard register sizes, count limits for holding and input registers are multiplied by 2 and then interpreted as byte count limits. ModMaster will warn you if you send a request that exceeds a count limit or whose response would exceed a limit. See the note on message size limits for more information.
Strict Checking. Normally ModMaster checks that received Modbus messages conform to the current Modbus specification, and rejects them if they do not. Some of these checks are not essential: messages that fail them can still be interpreted correctly. Deselect Strict Checking if you want ModMaster to be more tolerant of non-conforming messages.
The checks enabled by the Strict Checking setting are:
The byte count in a response message must match the count in the request message (commands 1 Read Coils, 2 Read Discrete Inputs, 3 Read Holding Registers, 4 Read Input Registers, 20 Read File Record, 23 Read/Write Multiple Holding Registers).
A response message must correctly echo data that was sent in the request (commands 5 Write Single Coil, 6 Write Single Holding Register, 8 Diagnostics, 15 Write Multiple Coils, 16 Write Multiple Holding Registers, 21 Write File Record, 22 Mask Write Holding Register, 43/14 Read Device Identification).
Unused fields in messages must be correctly set (command 43/14 Read Device Identification).
A message must not contain excess data.
Allow Long Messages. Some Modbus messages contain a count of the number of data bytes in the message. This byte-count is in a one-byte field, and so has a maximum value of 255, which limits the quantity of data that can be sent in a single message. The byte-count is actually redundant: it is possible to determine the number of data bytes in a message from the overall size of the message.
If you select Allow Long Messages, ModMaster will ignore the byte-count field and determine the number of data bytes from the overall message size, and will set the byte-count to 0 when sending messages containing more than 255 data bytes. If you also increase the Max PDU Size, ModMaster will be able to send and receive messages containing more than 255 data bytes.
Sending messages containing more than 255 data bytes is non-standard and not widely supported. It may affect the detection of the end of messages when using the RTU packet type, and may affect the ability of the CRC/LRC check to detect errors. However, it should be reliable when using a socket (TCP or UDP) connection. Note that UDP datagrams are limited in size, so this will limit the size of Modbus messages that can be sent using UDP.
Use Write-Single Functions. Normally ModMaster uses function code 15 (Write Multiple Coils) and function code 16 (Write Multiple Registers) for register writes. You can select this checkbox to use function code 5 (Write Single Coil) and function code 6 (Write Single Register) instead.