Mitsubishi Electric M800VW Series Programming Manual page 406

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 radian value set as a 64-bit floating-point real number from D20 to D23 to an angle, and
stores the result at D30 as a BCD value.
SM400
0
DEGD D20 D10
INTD D10 D0
BCD D0 D30
9
1024
1024
[Ladder mode]
Converts a radian value into an angle (1)
Converts the angle in 64-bit floating-point
real number into an integer (2)
Converts to a BCD value (3)
END
[Operations when the D20 to D23 value is 1.435792]
(1) Conversion 
to angle
D23 D22
D21
D20
1.435792
64-bit floating-point real
number
D0
(3) Conversion to
b15
b0
BCD
82
BCD
BIN value
D13 D12
D11
82.26482
64-bit floating-point real number
DEGD
(2) Conversion to BIN
INTD
D30
0
0
8
2
BCD value
385
[List mode]
Steps
Inst.
Device
0
LD
SM400
1
DEGD
D20
D10
4
INTD
D10
D0
7
BCD
D0
D30
9
END
D10
IB-1501667-B

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents