Conversion From Bin 32-Bit To Bin 16-Bit Data (Word(P)) - Mitsubishi MELSEC Q Series Programming Manual

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

WORD(P)
6.3.8

Conversion from BIN 32-bit to BIN 16-bit data (WORD(P))

WORD(P)
WORD
WORDP
Setting
Data
S
D
Function
Converts BIN 32-bit data at device designated by
result at a device designated by
Devices can be designated in the range from -32768 to 32767.
Operation Error
(1) In the following case, an operation error occurs, the error flag (SM0) turns ON, and an error
code is stored into SD0.
• The contents of the data designated by
32767.
Program Example
(1) 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.
[Ladder Mode]
[Operation]
R101
FFFF8253
(-32173)
6-90
Command
Command
: BIN 32-bit data or head number of the devices where the BIN 32-bit data is stored (BIN 32 bits)
S
: Head number of the devices where the converted BIN 16-bit data will be stored (BIN 16 bits)
D
Internal Devices
R, ZR
Bit
Word
.
D
S
S
+1
Upper 16 bits
Lower 16 bits
BIN 32-bit data
R100
D100
8253
H
H
(-32173)
High
Basic
performance
WORD
WORDP
J
\
U
\G
Bit
Word
to BIN 16-bit data with sign, and stores the
S
D
BIN 16-bit data
+1 and
are outside the range of
S
S
[List Mode]
Step
Instruction
Process
Redundant Universal
LCPU
S
D
S
D
Constants
Zn
Other
K, H
––
––
––
32768 to
(Error code: 4100)
Device

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents