4 read input status 1x (modbus function code 2) – ProSoft Technology MVI56E-MCM/MCMXT User Manual
Page 43
MVI56E-MCM ♦ ControlLogix Platform
Configuration as a Modbus Master
Modbus Communication Module
User Manual
ProSoft Technology, Inc.
Page 43 of 199
June 18, 2014
Below is a sample command to read Modbus addresses 0321 to 0480 of node 1
on the Modbus network.
Label
Description
Enable = 1
The module will send the command every time it goes through the
command list.
IntAddress = 16320
Places the data read from the Slave device into the module at address
16320. IntAddress 16320 of the module memory will be copied into the
tag MCM.DATA.R
EAD
D
ATA
[20]
because 16320 represents a bit
address within the memory of the MVI56E-MCM module (16320 / 16 =
register 1020).
Count = 160
Reads 160 consecutive bits from the Slave device.
Node = 1
Issues the Modbus command to node 1 on the network.
Func = 1
Issues Modbus Function Code 1 to Read Coils.
DevAddress = 320
Function Code 1, DevAddress of 320 will read address 0321
Along with a count of 160, this command reads 0321 to 0480.
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 1009
6 of
node 1 on the Modbus network.
Label
Description
Enable = 1
The module will send the command every time it goes through the
command list.
IntAddress = 16480
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.R
EAD
D
ATA
[30]
(bit16480 / 16 = register 1030).
Count = 16
Reads 16 consecutive registers from the Slave device.