Mitsubishi Electric M800VW Series Programming Manual page 400

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)
-126
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 converts the angle set as BCD 4-digit from X20 to X2F to radians, and stores the result at D20 and
D21 as a 32-bit floating-point real number.
SM400
0
10
32-bit floating-point real
number
128
128
[Ladder mode]
Inputs an angle to be converted into a
BIN K4X20 D0
radian value (1)
Converts the input angle into a 32-bit
FLT D0 D10
floating-point real number (2)
RAD D10 D20
Converts the converted angle into a
radian value (3)
END
[Operations when X20 to X2F designate a value of 120]
(1) Conversion
X2F
X20
to BIN
0
1
2
0
BCD value
BIN
(3) Conversion to
D11
D10
radian value
120
RAD
D0
b15
b0
120
BIN value
(2) Conversion to floating-point real
number
FLT
D21
D20
2.097395
32-bit floating-point real
number
379
[List mode]
Steps
Inst.
Device
0
LD
SM400
1
BIN
K4X20
D0
4
FLT
D0
D10
7
RAD
D10
D20
10
END
IB-1501667-B

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents