Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 427

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_U) in the label specified by (s) to 32-bit unsigned binary
data (ANY32_S), and store the converted data in the label specified by (d).
• The following figure shows a program example using the UDINT2DINT(P) instruction.
Ex.
The D+ instruction requires ANY32_S to be specified by the operand, and therefore, before the D+ instruction is executed, the
UDINT2DINT instruction is used to convert udLabel0 of ANY32_U to dLabel1 of ANY32_S.
The value in udLabel0 is stored in dLabel1 as is.
bSwitchA
UDINT2DINT
udLabel0
D+
dLabel0
bSwitchA: Bit
dLabel0, dLabel1: Double word [signed]
udLabel0: 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+ instruction, and the operation starts.
Operation error
There is no operation error.
UDINT2DINT
(s)
b31
∙∙∙
udLabel0
8000H
dLabel1
dLabel1
(2)
(d)
b16
b15
∙∙∙
b0
0001H
dLabel1
(1)
6.6 Data Conversion Instructions
b31
∙∙∙
b16
b15
∙∙∙
b0
8000H
0001H
6 BASIC INSTRUCTIONS
6
425

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents