Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 563

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Double-precision Floating-point Instructions
1. This program section converts the BCD data
to single-precision floating-point data (32 bits,
IEEE754-format).
a. The BIN(023) instructions convert the
BCD data to binary and the FLT(452) in-
structions convert the binary data to sin-
gle-precision floating-point data.
b. The floating-point data for the angle
output to D200 and D201.
c. RAD(458) converts the angle data in
D200 and D201 to radians.
d. The floating-point data for the radius r is
output to D1200 and D1201.
2. This program section calculates the sin
the cos as single-precision floating-point val-
ues.
a. The value for cos
D301.
b. The value for sin
D401.
3. This program section calculates x (r
and y (r
sin ).
a. The value for x (r
D10000 and D10001.
b. The value for y (r
D20000 and D20001.
Coordinate Floating-point
number
x
4116 59CF
y
405A E495
3-15-1 DOUBLE FLOATING TO 16-BIT: FIXD(841)
Purpose
Ladder Symbol
Variations
530
is
and
is output to D300 and
is output to D400 and
cos )
cos ) is output to
sin ) is output to
Real number
3.4202015399933
9.3969259262085
Comparison of the Calculation Results
When the real-number results are compared, it is clear that the double-preci-
sion calculation yields a more accurate result.
Converts a double-precision (64-bit) floating-point value to 16-bit signed
binary data and places the result in the specified result word.
FIXD(841)
S
S: First source word
D: Destination word
D
Variations
Executed Each Cycle for ON Condition
Executed Once for Upward Differentiation
Executed Once for Downward Differentiation Not supported.
Immediate Refreshing Specification
1. This program section converts the BCD data
to double-precision floating-point data (64
bits, IEEE754-format).
a. The BIN(023) instructions convert the
BCD data to binary and the DBL(843) in-
structions convert the binary data to dou-
ble-precision floating-point data.
b. The floating-point data for the angle
output to words D200 to D203.
c. RADD(849) converts the angle data in
words D200 to D203 to radians.
d. The floating-point data for the radius r is
output to words D1200 to D1203.
2. This program section calculates the sin
the cos
as double-precision floating-point
values.
a. The value for cos
D300 to D303.
b. The value for sin is output to words D400
and D403.
3. This program section calculates x (r
and y (r
sin ).
a. The value for x (r
words D10000 to D10003.
b. The value for y (r
D20000 and D20003.
Coordinate Floating-point
number
x
4022 CB39
E973 5C32
y
400B 5C92
91AC 8EEB
Section 3-15
is
and
is output to words
cos )
cos ) is output to
sin ) is output to
Real number
3.4202014332567
9.3969262078591
FIXD(841)
@FIXD(841)
Not supported.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents