ProSoft Technology MVI56E-MCMR User Manual

Page 75

Advertising
background image

MVI56E-MCMR ♦ ControlLogix Platform

Configuring the MVI56E-MCMR Module

Modbus Communication Module with Reduced Data Block

User Manual

ProSoft Technology, Inc.

Page 75 of 225

May 13, 2014

Along with the Function Code 3, MB Address in Device 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
MCMR.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 MCMR.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 MCMR.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.

Advertising