Mitsubishi Electric M800VW Series Programming Manual page 390

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 SIN
D30 as BCD 4-digit.
SM400
ASIND D0 D10
0
DEGD D10 D20
INTD D20 D30
10
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
SIN
-1
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 0.5]
(1)
D3
D2
D1
D0
operation
0.5
64-bit floating-point real
number
(3) Conversion
to BIN
D23
D22
D21
D20
30
64-bit floating-point real
number
-1
SIN
D13
D12
D11
D10
0.5235988
64-bit floating-point real
ASIND
number
(2) Conversion to angle
DEGD
D30
b15
b0
30
INTD
BIN value
369
[List mode]
Steps
Inst.
Device
0
LD
SM400
1
ASIND
D0
D10
4
DEGD
D10
D20
7
INTD
D20
D30
10
END
IB-1501667-B

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents