By default, in the .ini file, the memory sizes are defined in terms of bytes rather than elements.
To change the way the memory sizes are specified to indicate counts, define the following variable for each device affected device:
Writing Single Coils
Some devices use the Force Single Coil command (function code 5) for writing single coils.
Other devices support (sometimes exclusively) the Force Multiple Coils (function code 15) when writing coils.
You can configure the Modbus Ethernet communication interface to use a specific function code when writing single coils and when interacting with a particular device.
To control the behavior, for this specific action on a specific device with a model STAT_PLC, define the following variable within the device definition of the master_port.ini file located in the project’s data directory:
OneCoilWrite=1 will cause function code 5 to be used
OneCoilWrite=0 will cause function code 15 to be used.
Writing Single Holding Registers
Some devices use the Force Single Holding Registers command (function code 6) to write a single holding register.
Other devices support (sometimes exclusively) the Force Multiple Holding Registers Command (Function Code 16).
To control the behavior, for this specific function on a specific STAT_PLC device, define the following variable within the device definition of the master_port.ini file located in the project’s data directory:
OneRegisterWrite=1will cause function code 6 to be used.
OneRegisterWrite=0will cause function code 16 to be used.
Some devices will terminate a connection if it there is no activity for some pre-configured interval. For devices which exhibit this behavior, a global variable may be defined to change the device communication interface’s handling of a disconnect as it relates to device down. When the device variable is enabled, the device will not be declared down unless it is unable to re-establish the connection and perform the next immediate I/O operation to request or modify data on the device. The variable is defined within the device definition of the MASTER_PORT.INI file located in the project’s data directory:ConservesConn I=1 enables this processing
ConservesConn I=0 disables this processing
Host Redundancy with Devices with One Connection
Important: Some devices will support only one connection. In host redundant environments, it is necessary to identify the devices with this characteristic so that the connection can be terminated on the acting secondary and initiated on the primary following a transition in the host redundancy roles.
To identify a device that only supports a single connection, define the following variable under the affected device in the master_port.ini file located in the project’s data directory:
Note that a device down will not be generated as a result of not having a connection with the secondary.
ConnSecondary =1 enables this processing
ConnSecondary =0 disables this processing.
Sample .INI File.
Step 1.2.3. Step 1.2.3. Edit INI Files.