548
BASIN, BASINP
F
unct
i
on
(1) Returns the SIN
-1
(inverse sine) value of the value designated by and stores operation results (angles) at device
designated by .
(2) A sign for the operation data is set at .
If the operation data is a positive value, this is set at "0", and if it is a negative value, it is set at "1".
(3) The part before the decimal point and fraction part are stored at +1 and +2 respectively, as BCD values.
(Settings can be between 0 and 1.0000.)
(4) Operation results stored at are BCD values between 0 and 90 degrees, and 270 and 360 degrees (degree units).
(5) Calculation results are a value from which the decimal fraction part has been rounded.
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.
Program
E
xamp
l
e
(1) The following program performs a SIN
-1
operation on the sign (positive when X0 is OFF, and negative when X0 is ON),
the BCD 1-digit integer part from X30 to X33 and the BCD 4-digit decimal fraction part from X20 to X2F, and outputs the
calculated angle in 4 BCD digits from Y40 to Y4F.
[Ladder Mode]
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4100
The data specified in is not a BCD value.
The data specified in is not within the range from -1.0000 to 1.0000.
––
4101
The points of the device specified in exceed those of the
corresponding device.
––
––
––
––
S
D
+2
Integer part
Decimal fraction part
.
Sign
SIN
+1
)
(
D
S
S
S
1
S
S
S
D
S
S
S
Sets the sign of a SIN
v
alue ( )
Executes range check for the set SIN
v
alue
Sets the integer part of a SIN
v
alue ( )
Sets the decimal fraction part of a SIN
v
alue ( )
Executes Sin-1 operation and outputs
the result of operation to Y40 to Y4F ( )
1
2
3
4