Configuration as a Modbus Master MVI56E-MCM ♦ ControlLogix Platform
User Manual Modbus Communication Module
Page 46 of 209 ProSoft Technology, Inc.
2.3.4 Read Input Status 1x (Modbus Function Code 2)
Use this command to read Input Coils from a Slave device. These are single bit
addresses within a Modbus Slave device. Unlike Coils 0xxx, the Input Coils are
Read Only values and cannot be written to by a Modbus Master device. Also like
the Coils 0xxx, the IntAddress field of this command is defined down to the bit
level within the module memory.
Below is a sample command to read Modbus addresses 10081 to 10096 of node
1 on the Modbus network.
The module will send the command every time it goes through the
command list.
Places the data read from the Slave device into the module at address
16480. IntAddress 16480 of the module memory will be copied into the
tag MCM.DATA.READDATA[30] (bit16480 / 16 = register 1030).
Reads 16 consecutive registers from the Slave device.
Issues the Modbus command to node 1 on the network.
Issues Modbus Function Code 2 to Read Input Coils.
Function Code 2, DevAddress of 80 will read address 10081
Along with a count of 16, this command reads 10081 to 10096.
2.3.5 Force (Write) Single Coil 0x (Modbus Function Code 5)
Used to write a Coil of a Slave device, these are single bit addresses within a
Modbus Slave device. The IntAddress field of this command is defined down to
the bit level within the module memory, and should come from an area of
memory that has been defined within the MCM.DATA.WRITEDATA area (this is
configured within MCM.CONFIG.MODDEF.
Below is a sample command to write Modbus addresses 0513 of node 1 on the
Modbus network, only when the data associated with the IntAddress has
changed.