Rockwell Automation GMLC Reference Manual User Manual
Page 765

Publication GMLC-5.2 - November 1999
728
Using the RIO Adapter Option
The returned values are converted from the floating-point format used in
the motion controllers to 8-digit BCD values before being sent to the
PLC. This conversion is performed in the motion controller by
multiplying the floating-point values by the following and truncating any
remaining fractional part:
10
(Number of Decimal Digits)
The number of decimal digits (digits to the right of the decimal point) for
the returned values is fixed for all items in a given BTR, and is specified
by word 2 in the BTW data file used to request the data from the motion
controller. To recover the original value, the PLC must divide the received
BCD value by this same value.
For example, if two decimal digits are specified and the value of the item
is 3.1415926, the value 314 (3.1415926 x 10
2
= 314.159 (truncated to
314)) is stored in the returned value data file. In this case, since 314 is less
than 9999, 0000 is stored in the lower numbered word of the word pair
(the most significant word), and 0314 in the higher numbered word (the
least significant word). The PLC must then divide this value by 100 (10
2
),
with a result of 3.14—the original value accurate to two decimal places.
If the value is negative, the most significant bit of the most significant
word is set to 1. Continuing the example above, the value –3.1415926
would be stored as 8000 (8 = 1000 binary) in the lower numbered word of
the word pair (the most significant word), and 0314 in the higher
numbered word (the least significant word) in the returned data file.
With 32-bit Signed BCD numeric format, the largest value that can be
represented is ±79,999,999. This limits the largest values for items read
from the motion controller based on the number of decimal digits
specified for the transfer as shown in the following table.