beautypg.com

ProSoft Technology MVI94-MCM-MHI User Manual

Page 27

background image

MVI94-MCM ♦ Flex I/O Platform

Configuration

Serial Communications Modbus Communication Module

User Manual

ProSoft Technology, Inc.

Page 27 of 109

March 29, 2011

Along with the Function Code 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.R

EAD

D

ATA

[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.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.

This manual is related to the following products: