Floating-point support – ProSoft Technology MVI69E-MBTCP User Manual

Page 121

Advertising
background image

MVI69E-MBTCP ♦ CompactLogix Platform

Reference

Modbus TCP/IP Enhanced Communication Module

User Manual

ProSoft Technology, Inc.

Page 121 of 150

May 20, 2015

7.3

Floating-Point Support

You can easily move floating point data between the MBTCP module and other
devices as long as the device supports IEEE 754 Floating Point format. This
IEEE format is a 32-bit single-precision floating-point format.

The logic necessary to move the floating-point data takes advantage of the COP
instruction in RSLogix 5000. The COP instruction is unique for data movement
commands in that it is an untyped function, meaning that no data conversion is
done when data is moved between controller tags with different data types (that
is, it is an image copy, not a value copy).

The COP instruction to move data from a floating-point controller tag into an
integer controller tag (something you would do to move floating-point values to
the module) is shown below.

This instruction moves one floating-point value in two 16-bit integer images to
MBTCP.DATA.WriteData[0], which is an integer tag. For multiple floating-point
values increase the Length field by a factor of 2 per floating-point value.

The COP instruction to move data from MBTCP.DATA.ReadData[0], which is an
integer tag, to a floating-point tag (something you would do to receive floating-
point values from the module) is shown below.

This instruction moves two 16-bit integer registers containing one floating point
value image into the floating-point tag. For multiple values increase the Length
field.

Advertising