Configuration Parameters
There are a number of parameters associated with Modbus TCP Client that may need to be configured for certain applications. These parameters are kept in an internal file that can be modified if necessary. In order to modify them, you will use the TCO editor function.
The configuration file is /etc/conf.d/opt.rtu_modbus_tcp_client and contains the following parameters:
Parameter | Description |
---|---|
RESPTOSE RESPTOUSEC |
These parameters define response timeout second and response timeout microseconds. This defines how long the Modbus Client will wait for a response before timing out. |
BYTEOSE BYTEOUSEC |
These parameters define the maximum time allowed between received characters. |
ALWAYSON | These parameters define the maximum time allowed between received characters. |
PORT |
This parameter sets the TCP listen port for Modbus Client. |
DEBUG | If Debug is set to 1 (on), many diagnostic messages will be generated in syslog. The logread command may be used to review them. Debug should always be set to 0 (off) during normal operation. |
COFF BOFF HOFF IOFF |
Coil offset, Bit offset, Holding offset, and Input offset allow you to assign an offset to each class of Modbus device type when necessary. As an example, if a server requires that holding registers have a base address of 400001 and Z45 Controller Automation has holding registers located at location 1001, you can set HOFF=”399000” |
WOFF | As mentioned earlier, both input and output addresses start at 1 in Automation Control. WOFF adjusts the offset of outputs based on its value. By default, WOFF is set to 1000 giving the first output an address of 1001. |
WSWAP | Defaults to “0” (no swapping). This parameter controls the read order of 32 bit integers. When set to “1” (swap 32 bit read order), the second register is returned as the first. Some configurations may see incorrect values for 32 bit integers. Changing this value to “1” may resolve the issue. |