Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 421

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Processing details
• These instructions convert the 32-bit signed binary data (ANY32_S) in the label specified by (s) to 32-bit unsigned binary
data (ANY32_U), and store the converted data in the label specified by (d).
• The following figure shows a program example using the DINT2UDINT(P) instruction.
Ex.
The D+_U instruction requires ANY32_U to be specified by the operand, and therefore, before the D+_U instruction is
executed, the DINT2UDINT instruction is used to convert dLabel0 of ANY32_S to udLabel1 of ANY32_U.
The value in dLabel0 is stored in udLabel1 as is.
bSwitchA
DINT2UDINT
dLabel0
D+_U
udLabel0
bSwitchA: Bit
dLabel0: Double word [signed]
udLabel0, udLabel1: Double word [unsigned]/bit string [32 bits]
(1) The value is stored as is.
(2) The data type of the value is converted to the one of the operand in the D+_U instruction, and the operation starts.
Operation error
There is no operation error.
DINT2UDINT
(s)
b31
∙∙∙
dLabel0
8000H
udLabel1
udLabel1
(2)
(d)
b16
b15
∙∙∙
b0
0001H
udLabel1
(1)
6.6 Data Conversion Instructions
b31
∙∙∙
b16
b15
∙∙∙
b0
8000H
0001H
6 BASIC INSTRUCTIONS
6
419

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents