EasyManua.ls Logo

Mitsubishi Electric MELSEC iQ-R Series - Page 411

Mitsubishi Electric MELSEC iQ-R Series
2110 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
6 BASIC INSTRUCTIONS
6.6 Data Conversion Instructions
409
6
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.
Operation error
There is no operation error.
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.
bSwitchA
(d)
C000HwLabel1
(s)
b15 b0
C000HuLabel0
b15 b0 
UINT2INT uLabel0 wLabel1
+ wLabel0 wLabel1
(1)
(2)

Table of Contents

Other manuals for Mitsubishi Electric MELSEC iQ-R Series

Related product manuals