510
ASIN, ASINP
F
unct
i
on
(1) Returns the SIN
-1
angle of the SIN value designated by , and stores operation results at word device designated by .
(2) The SIN value designated by can be in the range from -1.0 to 1.0.
(3) The angle (operation result) stored at is stored in radian units.
For more information on the conversion between radian and angle data, see description of RAD and DEG instructions.
Operat
i
on
E
rror
(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.
*2:
There are CPU modules that will not result in an operation error if -0 is specified.
For details, refer to Page 88, Section 3.2.4.
Program
E
xamp
l
e
(1) The following program seeks the inverse sine of the 32-bit floating decimal point real number at D0 and D1, and outputs
the angle to the 4 BCD digits at Y40 to Y4F.
[Ladder Mode]
[List Mode]
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4100
The value specified by is not within the range between -1.0 and 1.0.
––
The specified device value is -0.
*2
––
––
––
4140
The specified device value is not within the following range:
0, 2
-126
| Specified device value | < 2
128
The specified device value is -0, unnormalized number, nonnumeric,
and ±
.
––
––
––
––
4141
The result exceeds the following range (when an overflow occurs):
2
128
| Operation result |
––
––
––
––
S
D
+1
+1
S
D
S
D
32-bit floating-point
real number
SIN (
)
32-bit floating-point
real number
-1
S
D
S
Ca
l
cu
l
ates
an
ang
l
e
(rad
i
an
v
a
l
ue)
by
S
IN
-
1
operat
i
on
(
)
Con
v
erts
the
rad
i
an
v
a
l
ue
i
nto
an
ang
l
e
(
)
Con
v
erts
the
ang
l
e
i
n
32
-
b
i
t
f
l
oat
i
ng
-
po
i
nt
rea
l
number
i
nto
an
i
nteger
(
)
Outputs
the
i
nteger
-
con
v
erted
ang
l
e
to
a
d
i
sp
l
ay
de
vi
ce
(
)
1
2
3
4
Step
I
nstruct
i
on
De
vi
ce