Mitsubishi MELSEC-Q/L Programming Manual page 504

Table of Contents

Advertisement

SIND, SINDP
(2) Angles designated at
S
For conversion between degrees and radian values, see the RADD and DEGD instructions.
(3) When the operation results in -0 or an underflow, the result is processed as 0.
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 specified device value is not within the following range:
-1022
4140
0, 2
| Specified device value | < 2
The specified device value is -0.
The operation result exceeds the following range (when an overflow
occurs):
4141
1024
2
| Operation result |
Program Example
(1) The following program conducts a SIN operation on the angles stored in the four BCD digits from X20 to X2F and stores
the results at D0 to D3 as 64-bit floating decimal point type real numbers.
[Ladder Mode]
[List Mode]
Step
Instruction
[Operations involved when X20 to X2F designate a value of 150]
1 Conversion
X2F
X20
to BIN
0
1 5 0
BCD value
BIN
D13 D12
64-bit floating-point
real number
502
are set in radian units (degrees
Error details
1024
Inputs an angle used for
SIN operation (
Converts the input angle into a
64-bit floating-point real number (
Converts the converted angle
into a radian value (
Executes SIN operation using the
converted radian value (
Device
D30
2 Conversion to
b15
b0
floating-point
150
BIN value
FLTD
D11
D10
4 SIN operation
2.617994
SIND
/ 180).
Q00J/
Q00/
QnH
QnPH QnPRH
Q01
––
––
––
––
).
1
).
2
).
3
.
)
4
D23 D22
D21
D20
150
64-bit floating-point
real number
3 Conversion to radian
RADD
D3 D2
D1
D0
0.500000
64-bit floating-point
real number
QnU
LCPU
––
––
––
––

Advertisement

Table of Contents
loading

Table of Contents