SINGLE_WRITE: Write a Single Register to a Modbus Device
The SINGLE_WRITE function block writes a single internal register to an external Modbus device.
SINGLE_WRITE - Specific Parameter Description
Input |
Type |
Comment |
---|---|---|
ObjType |
ObjectType |
ObjType describes the type of object(s) to write (MW only). |
FirstObject |
DINT |
FirstObject is the index of the object to write. |
theWord |
WORD |
This input contains the value to write. |
This example shows the implementation of the SINGLE_WRITE function block in conjunction with the ADDM function block in order to write a single register at address 11 of a Modbus slave. The Modbus slave is specified with address 8 and must be reachable through the serial line interface 1. Precondition is the configuration of the Modbus Manager as master under the serial line interface 1.