Modbus TCP

Connection Settings

Host

The hostname or IP of the modbus device.

Port

The port number the modbus device is accepting connections on.

Unit Id

Control the Unit ID in the header of the modbus request. The default value is 0.

Connect Timeout

Maximum time to wait for a connection to be established with the device. Valid range is 1-300 seconds. The default is 10 seconds.

Request Timeout

Maximum time to wait for the device to respond to a request. Valid range is 100-60000 milliseconds. The default is 100 milliseconds.

Zero Based Address

Specifies whether 1 should be subtracted from any input’s address before being sent to the device. Defaults to enabled.

For example, when reading register 400101 a value of 100 is sent when enabled and 101 is sent when disabled. By default modbus protocol specifies subtracting 1 from the address, known as zero based addressing.

Modbus Byte Order

When enabled, Modbus byte ordering (big endian) is used for encoding 16-bit register values. Big endian treats the first byte received as the high byte in a register value. Disable for sources that use little endian encoding, where the first byte received is treated as the low byte in a register value. The default is enabled.

First Word Low

When enabled, the first 16-bit register value of two consecutive registers is treated as the low word to make up a in a 32-bit value. When disabled, the first 16-bit register value is treated as the high word. The default is enabled.

First DWord Low

When enabled, the first two 16-bit register values of four consecutive registers are treated as the low double word to make up a in a 64-bit value. When disabled, the first two 16-bit register values are treated as the high double word. The default is enabled.

Input Settings

Setting Description
Start Address The starting modbus address to read. Valid start addresses included 000001 (output coil), 100001 (input coil), 300001 (input register) and 400001 (holding register). For holding registers, Bit Length and Treat as Signed fields are also available
Count The number of consecutive addresses to read, beginning with the start address. If the count is 1, the value will be provided as a scalar, otherwise the value will be provided as an array of size Count.
Unit Id This field is optional, and allows for overriding the connection level Unit Id. The default value of -1 uses the connection level setting, otherwise the provided Unit Id is used.
Bit Length Used only for holding registers. Specifies the length; 16, 32, 64.
Treat as Signed Used only for holding registers. Specifies if the value is signed or unsigned.

Output Settings

Setting Description
Start Address The starting modbus address to write to. Valid start addresses included 000001 (output coil), 100001 (input coil), 300001 (input register) and 400001 (holding register). For holding registers, Bit Length and Treat as Signed fields are also available.
Count The number of consecutive addresses to write, beginning with the start address. If the count is 1, the value written is a scalar, otherwise the value is an array of size Count.
Unit Id This field is optional, and allows for overriding the connection level Unit Id. The default value of -1 uses the connection level setting, otherwise the provided Unit Id is used.
Bit Length Used only for holding registers. Specifies the length; 16, 32, 64.
Treat as Signed Used only for holding registers. Specifies if the value is signed or unsigned.