Rockwell Automation Allen-Bradley ControlNet 1734-ACNR User Manual page 94

For logix5000 control systems
Table of Contents

Advertisement

5-18
Produce and Consume Tags (Interlock Controllers)
Re-construct a floating point value. This example takes two consumed integers that were originally
EXAMPLE
a produced REAL, reverses the order of the integers and assembles them into a floating point value
equal to the original REAL.
The two MOV instructions reverse the order of the integers and move them to a new location.
Because the destination of the COP instruction is a floating-point address, it takes two consecutive
integers, for a total of 32 bits, and converts them to a single floating-point value.
The length of a COP instruction is always multiplied by the size of the destination data type, so one
in this example means one times the size of REAL, for example 32 bits. COP uses as many
consecutive elements from the source file as necessary to satisfy this.
42354
Publication CNET-UM001C-EN-P - November 2005
The following example shows how to re-construct a REAL (floating point
value) in the PLC-5C controller
Consumed Integer Value A
Stored Data Low 16 Bits of the
Floating Point Word
Consumed Integer Value B
Stored Data High 16 Bits of the
Floating Point Word
Stored Data Low 16 Bits of the
Floating Point Word
Final Floating Point Value

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents