EasyManua.ls Logo

Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 - Page 695

Omron SYSMAC CJ - REFERENCE MANUAL 08-2008
1405 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...
655
Double-precision Floating-point Instructions (CS1-H, CJ1-H, CJ1M, or CS1D Only) Section 3-16
Comparing Single-precision and Double-precision Calculations
This example shows the differences in between single-precision and double-
precision calculations when the following vector expressed in polar coordi-
nates is converted to rectangular coordinates A (x,y).
In this example, the 4-digit BCD angle (
θ, in degrees) is read from D00000
and the 4-digit BCD distance (r) is read from D01000.
r = re
j
θ
360
π
Y
0
r
θ
X
r
A (x, y) = A (rcos θ, rsin θ)
000000
BIN
D00000
D00100
BIN
D01000
D01000
SIN
D00200
D00400
COS
D00200
D00300
END
*F
D01200
D00300
D10000
*F
D01200
D00400
D20000
FLT
D00100
D00200
FLT
D01000
D01200
RAD
D00200
D00200
000000
BIN
D00000
D00100
BIN
D01000
D01000
SIND
D00200
D00400
COSD
D00200
D00300
END
*D
D01200
D00300
D10000
*D
D01200
D00400
D20000
DBL
D00100
D00200
DBL
D01000
D01200
RADD
D00200
D00200
Ladder Program for the
Single-precision Calculation
Ladder Program for the
Double-precision Calculation

Table of Contents

Related product manuals