Delta AS Series Programming Manual page 836

Hide thumbs Also See for AS Series:
Table of Contents

Advertisement

Example
When X0.0 is ON, the FACOS instruction finds the arccosine of the floating-point number in (D1, D0) and stores it in
(D11, D10). The FDEG instruction converts the arccosine value in (D11, D10) into degrees, and stores the conversion
result in (D21, D20). The DINT instruction converts the degrees value in (D21, D20) into an integer, and stores the
conversion result in (D31, D30). The BCD instruction converts the integer in (D31, D30) into a binary-coded decimal
value, and stores the conversion result in Y0.15–Y0.0.
FACOS
D 0
R1
Floating-point number
D INT
D31 ~D30
Binary value
Additional remarks
1.
The floating-point number specified by the operand S must be between –1.0 to 1.0. If the floating-point number is
not in the range, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2003.
2.
If the value in S exceeds the range of values that can be represented by floating-point numbers, the instruction is
not executed, SM0 is ON, and the error code in SR0 is 16#2013.
FD EG
D11~D10
R3 .14 159 2
Floating-point number
BCD
Y0.15 ~Y0.0
8
18 0
0 1
Binary-coded decimal value
Ch ap te r 6 Ap pl ie d Instruc ti ons
D2 1~D20
R1 80
Floating-point number
0
6_
6 - 5 5 7

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents