Mitsubishi Electric M800VW Series Programming Manual page 394

Plc programming
Hide thumbs Also See for M800VW Series:
Table of Contents

Advertisement

M800V/M80V Series PLC Programming Manual (1/2)
8 Function Instructions
8.11 Special Function Instructions
 Operation errors
 In the following cases, an arithmetic error occurs, the error flag (SM0) turns ON, and an error code is stored at SD0.
- The value designated by (S) is outside the range of -1.0 to 1.0. (Error code: 34)
- The designated device value is not within the following range. (Error code: 35)
-1022
0, 2
≤ | Designated device value | < 2
- The designated device value is "-0", unnormalized number, nonnumeric, or ± ∞ . (Error code: 35)
- The operation result exceeds the following range. (When an overflow occurs) (Error code: 36)
| Operation result | < 2
 Program example
 The following program seeks the COS
D30 as BCD 4-digit.
SM400
0
10
64-bit floating-point real
number
64-bit floating-point real
number
1024
1024
-1
value of the 64-bit floating-point real number at D0 to D3, and stores the angle at
[Ladder mode]
Calculates an angle (radian
value) by COS
ACOSD D0 D10
(1)
Converts the radian value
DEGD D10 D20
into an angle (2)
Converts the angle in 64-bit
INTD D20 D30
floating-point real number
into an integer (3)
END
[Operations when the D0 to D3 value is 0.5]
(1) COS
D3
D2
D1
D0
operation
0.5
ACOSD
(3) Conversion
D23
D22
D21
D20
to BIN
60
INTD
-1
operation
-1
D13
D12
D11
D10
1.047198
64-bit floating-point real number
(2) Conversion to angle
DEGD
D30
b15
b0
60
BIN value
373
[List mode]
Steps
Inst.
Device
0
LD
SM400
1
ACOSD
D0
D10
3
DEGD
D10
D20
4
INTD
D20
D30
10
END
IB-1501667-B

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents