Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 405

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

Advertisement

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.
bSwitchA
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.
Operation error
There is no operation error.
INT2UINT
wLabel0
uLabel1
+_U
uLabel0
uLabel1
(2)
INT2UNIT
(s)
b15
∙∙∙
b0
wLabel0
C000H
6 BASIC INSTRUCTIONS
6.6 Data Conversion Instructions
(d)
b15
∙∙∙
b0
uLabel1
C000H
(1)
403
6

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents