Mitsubishi MELSEC Q Series Programming Manual page 641

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)
*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 seeks the inverse cosine 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 the D0 and D1 value is 0.5]
D1
0 . 5
32-bit floating-point
real number
D21
D20
6 0
32-bit floating-point
real number
is outside the range of from
S
| Contents of designated device | < 2
Device
D0
D11
-1
COS
operation
1 . 0 4 7 1 9 8
ACOS
32-bit floating-point
real number
Conversion
D30
b15
to BIN
60
INT
BIN value
1.0 to 1.0. (Error code: 4100)
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 COS
operation (
)
1
Converts the radian value into an angle (
Converts the angle in 32-bit floating-point
real number into an integer (
Outputs the integer-converted angle
to a display device (
)
4
D10
Conversion to angle
DEG
b0
BCD operation
Y40
Y4F
0 0 6 0
BCD
BCD value
ACOS(P)
(Error code: 4140)
(Error code: 4100)
(Error code: 4141)
.
(Error code: 4140)
)
2
)
3
7-267
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