65
Firmware version 1.10 - Document version 1.06 - eng
LTDVE1CH-40F | INSTRUCTIONS MANUAL
Figure 25. Example of data-flow code for writing a register
The connection between the
outSocket
output of filter
ModbusTCP_Connect
and the two
inSocket
inputs of filters
ModbusTCP_Write:SingleRegister?
and
ModbusTCP_Close
are made by drag
and drop from the output to the inputs. Clicking on one filter instance will cause the filter property
inspector to open on the bottom left panel of the user interface.
Configure the
ModbusTCP_Connect
filter as shown in the following figure.
Figure 26. Configuration of ModbusTCP_Connect filter
Configure the
ModbusTCP_Write:SingleRegister?
filter as shown in the following figure.
Figure 27. Configuration of ModbusTCP_Write:SingleRegister? filter
The Modbus register at address 0 contains the device type as an unsigned 16-bit number. This
register is defined as read only and any attempt to modify it will have no effect. Changing the values
of parameters
inRegisterAddress
and
inValue
will allow the writing of different registers. Please
refer to the Modbus register table of the controller for a list of all the registers available, the read and
write capabilities of each one and the relevant allowed values.
Note that is possible to swap the
ModbusTCP_Write:SingleRegister?
filter with the
ModbusTCP_Write:MultipleIntegerRegisters?
filter. The latter one will allow the writing of multiple