ProSoft Technology MVI56E-MCM/MCMXT User Manual
Page 48
![background image](https://www.manualsdir.com/files/866138/content/doc048.png)
Configuration as a Modbus Master
MVI56E-MCM ♦ ControlLogix Platform
User Manual
Modbus Communication Module
Page 48 of 199
ProSoft Technology, Inc.
June 18, 2014
Copy data from the MCM.DATA.R
EAD
D
ATA
[0] and [1]
into the tag
E
NERGY
_C
ONSUMPTION
that has a data type of REAL. Use a COP
statement
within the ladder logic. Here is an example.
Because the tag MCM.DATA.R
EAD
D
ATA
[0] should only be used within the above
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 would create a data casting statement and will result in the loss
or corruption of the original data.
2.4.2 Read Multiple Floating-Point Registers
The following table is an example to read Multiple Floating-Point values and
device addresses. The table shows 7 consecutive floating-point values (14
Modbus 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
Configure the command to read these 7 floats as follows.
Configure an array of 7 floats within the ControlLogix processor as shown in the
following illustration.