Mitsubishi MELSEC-Q/L Programming Manual page 512

Table of Contents

Advertisement

ASIN, ASINP
Function
-1
(1) Returns the SIN
angle of the SIN value designated by
(2) The SIN value designated by
(3) The angle (operation result) stored at
For more information on the conversion between radian and angle data, see description of RAD and DEG instructions.
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 value specified by
4100
The specified device value is -0.
The specified device value is not within the following range:
-126
0, 2
| Specified device value | < 2
4140
The specified device value is -0, unnormalized number, nonnumeric,
and ±
.
The result exceeds the following range (when an overflow occurs):
4141
128
2
| Operation result |
*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 Example
(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]
Step
Instruction
510
S
+1
S
-1
SIN (
32-bit floating-point
real number
can be in the range from -1.0 to 1.0.
S
is stored in radian units.
D
Error details
is not within the range between -1.0 and 1.0.
S
*2
128
Calculates an angle (radian value)
by SIN
-1
Converts the radian value
into an angle (
Converts the angle in
32-bit floating-point real
number into an integer (
Outputs the integer-converted
angle to a display device (
Device
, and stores operation results at word device designated by
S
D
D
+1
)
32-bit floating-point
real number
Q00J/
Q00/
QnH
Q01
––
––
––
––
––
––
operation (
)
1
)
2
)
3
)
4
QnPH QnPRH
QnU
LCPU
––
––
––
––
––
––
.
D

Advertisement

Table of Contents
loading

Table of Contents