Mitsubishi Electric M800VW Series Programming Manual page 402

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 converts the angle set as BCD 4-digit from X20 to X2F to radians, and stores the result at D20 to
D23 as a 64-bit floating-point real number.
SM400
0
9
X2F
0
D13
64-bit floating-point real
number
1024
1024
[Ladder mode]
Inputs an angle to be converted into a
BIN K4X20 D0
radian value (1)
Converts the input angle into a 64-bit
FLTD D0 D10
floating-point real number (2)
RADD D10 D20
Converts the converted angle into a
radian value (3)
END
[Operations when X20 to X2F designate a value of 120]
(1) Conversion
X20
to BIN
1
2
0
BCD value
BIN
(3) Conversion to
D12
D11
D10
radian value
120
RADD
D0
b15
b0
120
BIN value
(2) Conversion to floating-point
real number
FLTD
D3
D2
D1
D1
2.094395
64-bit floating-point real
number
381
[List mode]
Steps
Inst.
Device
0
LD
SM400
1
BIN
K4X20
D0
3
FLTD
D0
D10
6
RADD
D10
D20
9
END
IB-1501667-B

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents