Mitsubishi Electric M800VW Series Programming Manual page 398

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 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 TAN
D30 as BCD 4-digit.
SM400
0
ATAND D0 D10
DEGD D10 D20
INTD D20 D30
10
64-bit floating-point real
64-bit floating-point real
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 TAN
operation (1)
Converts the radian value into an
angle (2)
Converts the angle in 64-bit floating-point
real number into an integer (3)
END
[Operations when the D0 to D3 value is 1]
(1) TAN
D3
D2
D1
D0
operation
1
ATAND
number
(3) Conversion
D23
D22
D21
D20
to BIN
45
INTD
number
-1
-1
D13
D12
D11
D10
0.785398
64-bit floating-point real number
(2) Conversion to angle
DEGD
D30
b15
b0
45
BIN value
377
[List mode]
Steps
Inst.
Device
0
LD
SM400
1
ATAND
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