Mitsubishi MELSEC Q Series Programming Manual page 643

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 of the specified device is not in the following range:
-1022
0,2
• The value of the designated device is
• The value specified by
the range of -1.0 to 1.0.
• The result exceeds the following range (Operation results in an overflow):
1024
2
Program Example
(1) The following program seeks the inverse cosine of the 64-bit floating decimal point real
number at D0 to D3, and outputs the angle to the 4 BCD digits at Y40 to Y4F.
[Ladder Mode]
[List Mode]
Step
Instruction
[Operations involved when the D0 to D3 value is 0.5]
D3 D2
D1
0.5
64-bit floating-point
real number
D23 D22
D21
60
64-bit floating-point
real number
| value of specified device | < 2
is within the double-precision floating-point range and outside
S
| Operation result |
Device
D0
D13 D12
1
COS operation
1
64-bit floating-point
ACOSD
real number
3
Conversion
D30
b15
D20
to BIN
60
BIN value
INTD
1024
0.
Calculates an angle (radian value) by COS
operation (
).
1
Converts the radian value into an angle (
Converts the angle in 64-bit floating-point
real number into an integer (
Outputs the integer-converted angle to a
display device (
).
4
D11
D10
1.047198
Conversion to angle
2
DEGD
BCD operation
4
b0
Y4F
Y40
0 0 6 0
BCD value
BCD
ACOSD(P)
(Error code: 4140)
(Error code: 4140)
(Error code: 4100)
(Error code: 4141)
1
).
2
).
3
7-269
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