Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and
an error code is stored into SD0.
• The value of the specified device is not in the following range:
-1022
0,2
• The value of the designated device is
• The value specified by
the range of -1.0 to 1.0.
• The result exceeds the following range (Operation results in an overflow):
1024
2
Program Example
(1) The following program seeks the inverse sine of the 64-bit floating decimal point real number
at D0 to D3, and outputs the angle to the 4 BCD digits at Y40 to Y4F.
[Ladder Mode]
[List Mode]
Step
[Operations involved when the D0 to D3 value is 0.5]
D3 D2
D1
0.5
64-bit floating-point
real number
D23 D22
D21
30
64-bit floating-point
real number
| value of specified device | < 2
is within the double-precision floating-point range and outside
S
| Operation result |
Instruction
Device
D0
D13 D12
1
SIN operation
1
64-bit floating-point
ASIND
real number
D30
Conversion
3
D20
b15
to BIN
30
INTD
BIN value
1024
0.
Calculates an angle (radian value)
1
by SIN operation (
).
1
Converts the radian value into
an angle (
).
2
Converts the angle in 64-bit floating-point
real number into an integer (
Outputs the integer-converted angle to a
display device (
).
4
D11
D10
0.5235988
Conversion to angle
2
DEGD
BCD operation
4
b0
Y4F
Y40
0 0 3 0
BCD
BCD value
ASIND(P)
(Error code: 4140)
(Error code: 4140)
(Error code: 4100)
(Error code: 4141)
).
3
7-265
1
2
3
4
6
6
7
8