Mitsubishi MELSEC Q Series Programming Manual page 661

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
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.
• The value designated by
• The contents of the designated device or the result of the addition are not "0", or not within
the following range(For the Universal model QCPU, LCPU):
-126
0, 2
• The value of the specified device is
(For the Basic model QCPU, High Performance model QCPU, Process CPU, Redundant
CPU, and Q4ARCPU)
*3: 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 seeks the square root of the value set by the 4 BCD digits from X20
to X2F, and stores the result as a 32-bit floating decimal point type real number at D0 and
D1.
[Ladder Mode]
[List Mode]
Step
Instruction
[Operations involved when value designated by X20 to X2F is 650]
1
X2F
X20
0
6 5 0
BCD value
is a negative number.
S
| Contents of designated device | < 2
Device
Conversion
D20
Conversion to
2
b15
b0
to BIN
floating-point
650
BIN
FLT
BIN value
128
*3
0.
0 is specified. For details, refer to 3.2.4.
0, unnormalized number, nonnumeric, and ±
Inputs data used for
square root operation (
)
1
Converts the input data into a
32-bit floating-point real number (
Executes square root
operation (
)
3
D11
D10
SQR operation
3
6 5 0
SQR
SQR(P)
(Error code: 4100)
(Error code: 4140)
(Error code: 4100)
(Error code: 4141)
.
(Error code: 4140)
)
2
D1
D0
2 5 . 4 9 5 1
7-287
1
2
3
4
6
6
7
8

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents