Mitsubishi MELSEC-Q/L Programming Manual page 550

Table of Contents

Advertisement

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

Advertisement

Table of Contents
loading

Table of Contents