EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Conversion from bin 32-Bit to bin 16-Bit Data

Mitsubishi Electric MELSEC-Q/L
1084 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...
282
6 BASIC INSTRUCTIONS
6.3 Data Conversion Instructions
Conversion from BIN 32-bit to BIN 16-bit data
WORD(P)
Processing details
Converts BIN 32-bit data at device designated by (S) to BIN 16-bit data with sign, and stores the result at a device
designated by (D).
Devices can be designated in the range from -32768 to 32767.
Operation error
In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Program example
The following program converts the BIN 32-bit data at R100 and R101 to BIN 16-bit data when X20 is ON, and stores it at
D100.
(S): BIN 32-bit data or head number of the devices where the BIN 32-bit data is stored (BIN 32 bits)
(D): Head number of the devices where the converted BIN 16-bit data will be stored (BIN 16 bits)
Setting
data
Internal device R, ZR J\ U\G Zn Constant
K, H
Others
Bit Word Bit Word
(S) 
(D) 
Error
code
Error details Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4100 The data specified by (S)+1 and (S) are outside the range of -32768 to
32767.

[Ladder Mode] [List Mode]
[Operation]
Basic
Process
High
performance
Redundant
Universal
LCPU
Command
Command
WORDP
WORD
S D
DS
WORDP
WORD
BIN 32-bit data
Upper 16 bits
+1
Lower 16 bits BIN 16-bit data
S S D
Step
Instruction
Device
8253
H
FFFF8253
H
D100R100R101
(-32173) (-32173)

Table of Contents

Related product manuals