![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_742268696.webp)
657
Double-precision Floating-point Instructions (CS1-H, CJ1-H, CJ1M, or CS1D Only)
Section 3-16
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.
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
θ
is
output to D00200 and D00201.
c)
RAD(458) converts the angle data in
D00200 and D00201 to radians.
d) The floating-point data for the radius r is
output to D01200 and D01201.
2.
This program section calculates the sin
θ
and
the cos
θ
as single-precision floating-point val-
ues.
a) The value for cos
θ
is output to D00300
and D00301.
b) The value for sin
θ
is output to D00400
and D00401.
3.
This program section calculates x (r
×
cos
θ
)
and y (r
×
sin
θ
).
a) The value for x (r
×
cos
θ
) is output to
D10000 and D10001.
b) The value for y (r
×
sin
θ
) is output to
D20000 and D20001.
Coordinate
Floating-point
number
Real number
x
4116 59CF
3.4202015399933
y
405A E495
9.3969259262085
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
θ
is
output to words D00200 to D00203.
c)
RADD(849) converts the angle data in
words D00200 to D00203 to radians.
d) The floating-point data for the radius r is
output to words D01200 to D01203.
2.
This program section calculates the sin
θ
and
the cos
θ
as double-precision floating-point
values.
a) The value for cos
θ
is output to words
D00300 to D00303.
b) The value for sin
θ
is output to words
D00400 and D00403.
3.
This program section calculates x (r
×
cos
θ
)
and y (r
×
sin
θ
).
a) The value for x (r
×
cos
θ
) is output to
words D10000 to D10003.
b) The value for y (r
×
sin
θ
) is output to
D20000 and D20003.
Coordinate
Floating-point
number
Real number
x
4022 CB39
E973 5C32
3.4202014332567
y
400B 5C92
91AC 8EEB
9.3969262078591
Содержание SYSMAC CS1D-CPU**
Страница 3: ...iv...
Страница 29: ...xxx...
Страница 185: ...146 List of Instructions by Function Code Section 2 4...
Страница 193: ...154 3 35 4 MOVE BIT MOVBC 568 1274 3 35 5 BIT COUNTER BCNTC 621 1276 3 35 6 GET VARIABLE ID GETID 286 1278...
Страница 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Страница 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Страница 1391: ...1352 ASCII Code Table Appendix A...