Mitsubishi MELSEC-Q/L Programming Manual page 533

Table of Contents

Advertisement

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 operation result is not within the following range:
-126
2
| Operation result | < 2
The operation result is not within the following range:
4100
-126
2
| Operation result | < 2
The specified device value is -0.
The specified device value is -0, unnormalized number, nonnumeric, or
4140
±
.
The operation 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 performs an exponent operation on the value set by the 2 BCD digits at X20 to X27, and stores
the results as a 32-bit floating decimal point real number at D0 and D1.
[Ladder Mode]
[List Mode]
Step
Instruction
[Operations involved when value designated by X20 to X27 is 13]
1
Conversion
X27
X20
to BIN
1 3
BCD value
BIN
*4:
The operation result will be under 2
Because setting a value of over 90 will return an operation error, turn M1 ON if a value of over 90 has been set to avoid the
error.
Error details
128
128
*2
Device
D20
2
Conversion to
b15
b0
floating-point
13
BIN value
32-bit floating-point
FLT
real number
129
if the BCD value of X20 to X27 is less than 89, from the calculation loge 2
Q00J/
Q00/
QnH
Q01
––
––
––
––
––
––
Inputs the data used for
exponent operation (
).
1
Checks the range of the
value for operation. *4
Converts the input data into
a 32-bit floating-point real number (
Executes exponent operation (
3
D11
D10
EXP operation
3
1 3
EXP
EXP, EXPP
QnPH QnPRH
QnU
––
––
––
––
––
––
––
––
––
).
2
).
D1
D0
4 4 2 4 1 3 . 4
32-bit floating-point
real number
129
1
2
LCPU
3
––
––
4
––
4
6
7
8
= 89.4.
531

Advertisement

Table of Contents
loading

Table of Contents