EasyManua.ls Logo

Omron CJ - INSTRUCTIONS - Page 558

Omron CJ - INSTRUCTIONS
1308 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
3. Instructions
520
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Ladder Program for the Double-precision Calculation
Comparison of the Calculation Results
When the real-number results are compared, it is clear that the double-precision calculation yields a
more accurate result.
1. This program section converts the BCD data to dou-
ble-precision floating-point data (64 bits, IEEE754-for-
mat).
The BIN(023) instructions convert the BCD data to
binary and the DBL(843) instructions convert the
binary data to double-precision floating-point data.
The floating-point data for the angle θ is output to
D200 and D203.
RADD(849) converts the angle data in words D200
and D203 to radians.
The floating-point data for the radius r is output to
words D1200 and D1203.
2. This program section calculates the sin θ and the cos
θ as double-precision floating-point values.
The value for cos θ is output to words D300 and
D303.
The value for sin θ is output to words D400 and
D403.
3. This program section calculates x (r × cos θ) and y (r ×
sin θ).
The value for x (r × cos θ) is output to words
D10000 and D10003.
•The value for y (r × sin θ) is output to D20000 and
D20003.
0.00
BIN
D0
D100
BIN
D1000
D1000
SIND
D200
D400
COSD
D200
D300
END
*D
D1200
D300
D10000
*D
D1200
D400
D20000
DBL
D100
D200
DBL
D1000
D1200
RADD
D200
D200
1.
2.
3.
Coordinate Floating-point number Real number
x 4022 CB39 E973 5C32 3.4202014332567
y 400B 5C92 91AC 8EEB 9.3969262078591

Table of Contents

Related product manuals