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
| Operation result |
• The value of the specified device is
(For the Universal model QCPU, LCPU)
Program Example
(1) The following program converts the radian value set with 32-bit floating decimal point type
real number at D20 and D21 to angles, and stores the result as a BCD value at Y40 to Y4F.
[Ladder Mode]
[List Mode]
Step
Instruction
[Operations involved when the values at D20 and D21 are 1.435792]
D21
D20
1 . 4 3 5 7 9 2
32-bit floating-point
real number
*2
0.
0, unnormalized number, nonnumeric, and ±
Converts a radian value into
an angle (
Converts the angle in
32-bit floating-point real
number into an integer (
Outputs the converted integer
to a display device (
Device
Conversion
D11
D10
to angle
8 2 . 2 6 4 8 2
DEG
32-bit floating-point
real number
(Error code: 4100)
0 is specified. For details, refer to 3.2.4.
(Error code: 4141)
(Error code: 4140)
)
1
)
2
)
3
Conversion
D0
BCD operation
to BIN
b15
b0
82
BIN
BIN value
BCD
DEG(P)
1
2
3
4
.
6
6
7
8
Y4F
Y40
0 0 8 2
BCD value
7-279