6 BASIC INSTRUCTIONS
6.6 Data Conversion Instructions
403
6
Processing details
• These instructions convert the 16-bit signed binary data (ANY16_S) in the label specified by (s) to 16-bit unsigned binary
data (ANY16_U), and store the converted data in the label specified by (d).
• The following figure shows a program example using the INT2UINT(P) instruction.
Ex.
The +_U instruction requires ANY16_U to be specified by the operand, and therefore, before the +_U instruction is executed,
the INT2UINT instruction is used to convert wLabel0 of ANY16_S to uLabel1 of ANY16_U.
The value in wLabel0 is stored in uLabel1 as is.
Operation error
There is no operation error.
bSwitchA: Bit
wLabel0: Word [signed]
uLabel0, uLabel1: Word [unsigned]/bit string [16 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 +_U instruction, and the operation starts.
bSwitchA
(d)
C000H
uLabel1
(s)
b15
b0
C000H
wLabel0
b15
b0
∙∙∙
∙∙∙
INT2UINT
wLabel0
uLabel1
+_U
uLabel0
uLabel1
INT2UNIT
(1)
(2)
Summary of Contents for MELSEC iQ-R Series
Page 1: ...MELSEC iQ R Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 24: ...22 INDEX 2092 INSTRUCTION INDEX 2093 REVISIONS 2104 WARRANTY 2105 TRADEMARKS 2106 ...
Page 34: ...32 MEMO ...
Page 35: ...33 PART 1 PART 1 OVERVIEW This part consists of the following chapter 1 OVERVIEW ...
Page 68: ...66 1 OVERVIEW 1 5 Precautions on Programming MEMO ...
Page 1448: ...1446 14 REDUNDANT SYSTEM INSTRUCTIONS 14 2 Disabling Enabling System Switching MEMO ...
Page 1972: ...1970 33 TIME DATA TYPE FUNCTIONS 33 4 Division MEMO ...
Page 2067: ...APPX Appendix 5 PID Control Program Examples 2065 A 252 Set PID control data for loop 2 ...
Page 2109: ......