Floating-point support, Enron floating-point support – ProSoft Technology MVI69L-MBTCP User Manual

Page 120

Advertising
background image

Reference

MVI69L-MBTCP ♦ CompactLogix Platform

User Manual

Communication Module

Page 120 of 152

ProSoft Technology, Inc.

January 6, 2014

7.3

Floating-Point Support

The movement of floating point data between the MBTCP module and other
devices is easily accomplished 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 will move 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 will move two 16-bit integer registers containing one floating point
value image into the floating-point tag. For multiple values increase the Length
field.

7.3.1 ENRON Floating-Point Support

Many manufacturers have implemented special support in their drivers for what is
commonly called the Enron version of the Modbus protocol. In this
implementation, addresses greater than 7000 are presumed to contain floating-
point values. The significance to this is that the count descriptor for a data
transfer now denotes the number of floating-point values to transfer, instead of
the number of words.

Advertising