Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 411

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_U) in the label specified by (s) to 16-bit unsigned binary
data (ANY16_S), and store the converted data in the label specified by (d).
• The following figure shows a program example using the UINT2INT(P) instruction.
Ex.
The + instruction requires ANY16_S to be specified by the operand, and therefore, before the + instruction is executed, the
UINT2INT instruction is used to convert uLabel0 of ANY16_U to wLabel1 of ANY16_S.
The value in uLabel0 is stored in wLabel1 as is.
bSwitchA
bSwitchA: Bit
wLabel0, wLabel1: Word [signed]
uLabel0: 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 + instruction, and the operation starts.
Operation error
There is no operation error.
UINT2INT
uLabel0
wLabel1
+
wLabel0
wLabel1
(2)
(s)
b15
∙∙∙
b0
uLabel0
C000H
6 BASIC INSTRUCTIONS
6.6 Data Conversion Instructions
(d)
b15
∙∙∙
b0
wLabel1
C000H
(1)
409
6

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents