
Configuration as a Modbus Master
MVI56-MCM
♦
ControlLogix Platform
Modbus Communication Module
ProSoft Technology, Inc.
Page 41 of 159
July 24, 2008
Along with the FC 3, DevAddress 256 will read Modbus address 40257 of the
slave device.The above command will read 40257 and 40258 of the Modbus
Slave #1 and place that data in MCM.DATA.ReadData[0] and [1].
Within the controller tags section of the ControlLogix processor, it is necessary to
configure a tag with the data type of "REAL" as shown in the following illustration.
[+] Energy_Consumption
REAL[1] Float
Copy data from the MCM.DATA.ReadData[0] and [1] into the tag
"Energy_Consumption" that has a data type of REAL. Use a COP statement
within the ladder logic. Here is an example.
Because the tag MCM.DATA.ReadData[0] should only be used within the above
configured command, an unconditional COP statement can be used.
Notice the length of the COP statement is a value of 1. Within a Rockwell
Automation processor, a COP statement will copy the required amount of
"Source" values to fill the "Dest" tag for the Length specified.
Therefore the above statement will copy ReadData[0] and [1] to fill the 32 bits
required for the tag "Energy_Consumption".
Note: Do not use a MOV statement. A MOV will convert the data from the Source register to the
destination register data type. This is a cast statement and will convert the data.
4.4.2 Read Multiple Floating Point Registers
Below is an example to read Multiple Floating Point values and device
addresses.
Value
Description
Type
40261
KW
Demand (power)
Float. upper 16 bits
40263
VAR
Reactive Power
Float. upper 16 bits
40265
VA
Apparent Power
Float. upper 16 bits
40267
Power Factor
Float. upper 16 bits
40269
VOLTS
Voltage, line to line
Float. upper 16 bits
40271
VOLTS
Voltage, line to neutral
Float. upper 16 bits
40273
AMPS
Current
Float. upper 16 bits
Table above shows 7 consecutive floating point values (14 Modbus addresses).