Mitsubishi MELSEC Q Series Programming Manual page 645

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 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 High Performance model QCPU, Process CPU, Redundant CPU)
*2: There are CPU modules that will not result in an operation error if
• he 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 inverse tangent of the 32-bit floating decimal point real
number at D0 and D1, and outputs the angle to the 4 BCD digits at Y40 to Y4F.
[Ladder Mode]
[List Mode]
Step
Instruction
[Operations involved when D0 and D1 value is 1]
D1
1
32-bit floating-point
real number
D21
D20
4 5
32-bit floating-point
real number
| Contents of designated device | < 2
Device
D0
-1
D11
TAN
operation
0 . 7 8 5 3 9 8
ATAN
32-bit floating-point
real number
D30
Conversion to BIN
b15
45
INT
BIN value
128
*2
0.
0 is specified. Refer to 3.2.4 for details.
0, unnormalized number, nonnumeric, and ±
Calculates an angle (radian value)
-1
by TAN
operation (
)
1
Converts the radian value
into an angle (
)
2
Converts the angle in
32-bit floating-point real
number into an integer (
Outputs the integer-converted
angle to a display device (
D10
Conversion to angle
DEG
BCD operation
b0
Y4F
Y40
0 0 4 5
BCD
BCD value
ATAN(P)
(Error code: 4140)
(Error code: 4100)
(Error code: 4141)
.
(Error code: 4140)
)
3
)
4
7-271
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