MVI56E-MCMR ♦ ControlLogix Platform
Modbus Communication Module with Reduced Data Block
2.3.7 Floating-Point Data Handling (Modbus Master)
In many applications, it is necessary to read or write floating-point data to the
slave device. The sample program only provides an INT array for the ReadData
and Write Data array (16-bit signed integer value). In order to read/write floating-
point data to and from the slave device, you must add additional ladder logic to
handle the conversion of the data to a REAL data type within the ControlLogix
processor. This is very easy to accomplish.
The following topics show how to read or write data to a slave device. These
topics also show when to use the Float Flag and Float Start parameters within
the module configuration. For all applications, floating-point data can be read
from a device without any changes to the Float Flag and Float Start parameters.
You only need to configure these parameters to issue a Write command to a
device that uses a single Modbus address, such as 47001, to represent a single
floating-point value.
Read Floating-Point Data
Here is the addressing of a slave device, with a parameter "Energy
Consumption" that is shown as two registers 40257 and 40258.
Value
40257
--------
40258
To issue a Read command to this parameter, use the following configuration.
Parameter
Enable = 1
Internal Address = 1000
Poll Interval = 0
Count = 2
Swap = 0
Node = 1
Func = 3
MB Address in Device =
256
ProSoft Technology, Inc.
Description
KWH
Energy Consumption
KWH
Energy Consumption
Description
Sends the command every time through the command list.
Places data at address 1000 of the module memory. Based on the
configuration in ModDef this will put the data at the tag
MCMR.DATA.R
EAD
No delay for this command.
Reads 2 consecutive registers from the Slave device. These 2
Modbus registers will make up the "Energy Consumption" floating-
point value.
Swap Code Description
0
None - No Change is made in the byte ordering
(1234 = 1234)
1
Words - The words are swapped (1234 = 3412)
2
Words & Bytes - The words are swapped then the
bytes in each word are swapped (1234 = 4321)
3
Bytes - The bytes in each word are swapped
(1234 = 2143)
Sends the command to Modbus Slave Device Address 1.
Issues a Modbus Function Code 3 to "Read Holding registers."
Along with the Function Code 3, MB Address in Device 256 will read
Modbus address 40257 of the Slave device.
Configuring the MVI56E-MCMR Module
Type
Float, lower 16 bits
Float, upper 16 bits
D
[0].
ATA
User Manual
Page 71 of 223
Need help?
Do you have a question about the MVI56E-MCMR and is the answer not in the manual?
Questions and answers