SIN(P)
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.
• The value of the specified device is
(For the Basic model QCPU, High Performance model QCPU, Process CPU, Redundant
CPU)
*2: There are CPU modules that will not result in an operation error if
• The result exceeds the following range (Operation results in an overflow)
(For the Universal model QCPU, LCPU)
128
2
• The value of the specified device is
(For the Universal model QCPU, LCPU)
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 and D1 as 32-bit floating decimal point type
real numbers.
[Ladder Mode]
[List Mode]
Step
[Operations involved when X20 to X2F designate a value of 150]
X2F
0
1 5 0
BCD value
D21
32-bit floating-point
real number
7-250
| Operation result |
Instruction
Device
D30
Conversion to BIN
X20
b15
b0
150
BIN
BIN value
Conversion to floating-point
D20
Conversion to radian
1 5 0
RAD
32-bit floating-point
real number
*2
0.
0 is specified. For details, refer to 3.2.4.
0, unnormalized number, nonnumeric, and ±
Inputs an angle used for SIN
operation (
).
1
Converts the input angle into
a 32-bit floating-point real
number (
).
2
Converts the converted angle
into a radian value (
).
3
Executes SIN operation
using the converted radian value (
FLT
D11
D10
SIN operation
2 . 6 1 7 9 9 4
SIN
(Error code: 4100)
(Error code: 4141)
.
(Error code: 4140)
).
4
D1
D0
0 . 5 0 0 0 0 0
32-bit floating-point
real number