Mitsubishi Electric M800VW Series Programming Manual page 246

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.3 Data Conversion Instructions
 Program example
 The following program converts the 32-bit floating-point real number at D20 and D21 to BIN 16-bit data, and stores the
result at D0.
[Ladder mode]
SM400
0
4
Conversion
D20
D21
to integer
25915.6796
32-bit floating-point real number
Conversion
D21
D20
to integer
-33562.3211
32-bit floating-point real number
 The following program converts the 32-bit floating-point real number at D20 and D21 to BIN 32-bit data, and stores the
result at D0 and D1.
[Ladder mode]
SM400
0
4
Conversion
D20
D21
to integer
-574968.321
32-bit floating-point real number
Conversion
D21
D20
to integer
2147483649.22
32-bit floating-point real number
INTP D20 D0
END
[Operation]
D0
25916
BIN value
An arithmetic error occurs because the specified data is
larger than 2147483647.
DINTP D20 D0
END
[Operation]
D1
D0
-574968
BIN value
An arithmetic error occurs because the specified data is
larger than 2147483647.
225
[List mode]
Steps
Inst.
Device
0
LD
SM400
1
INTP
D20
D0
4
END
[List mode]
Steps
Inst.
Device
0
LD
SM400
1
DINTP
D20
D0
4
END
IB-1501667-B

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents