Configuration as a Modbus Master MVI56E-MCM ♦ ControlLogix Platform
User Manual Modbus Communication Module
Page 48 of 209 ProSoft Technology, Inc.
2.3.7 Preset (Write) Single Register 4x (Modbus Function Code 6)
Used to write to Modbus Holding Registers 4xxxx, this function code will write a
single register to the Slave device. The Enable code can be set to a value of 1 for
a continuous write, or a value of 2 to write the data to the Slave device only when
the data associated with the IntAddress field has changed.
Below is a sample command to write Modbus addresses 41041 of node 1 on the
Modbus network.
The module will send the command every time it goes through the
command list.
Writes the data from address 5 of the module memory to the Slave
device. Based on the MCM.CONFIG.MODDEF configuration, this will
take the data from MCM.DATA.WRITEDATA[5] and write that information
out to the Slave device.
Writes 1 register (16-bit) to the Slave device.
Issues the Modbus command to node 1 on the network.
Issues Modbus Function Code 6 to write a single register.
Function Code 6, DevAddress of 1040 will write to address 41041 of the
Modbus Slave device.
2.3.8 Preset (Write) Multiple Registers 4x (Modbus Function Code
16)
Used to write to Modbus Holding Registers 4xxxx, this function code will write
multiple registers to the Slave device. The Enable code can be set to a value of 1
for a continuous write, or a value of 2 to write the data to the Slave device only
when the data associated with the IntAddress field has changed.
Below is a sample command to write Modbus addresses 41051 to 41060 of node
1 on the Modbus network.
The module will send the command only when the data associated with
the IntAddress of the module has changed.