6.3 Data Conversion Instructions
6.3.8 32-bit BIN data to 16-bit BIN data conversion
6-85
6
BA
S
IC
INSTRUCTIONS
WORD
WORD
6.3.8
32-bit BIN data to 16-bit BIN data conversion
WORD
F
unct
i
on
Converts 32-bit BIN data in the device specified for
to 16-bit BIN data with a sign, and stores
the result to the device specified for
.
Devices can be specified in the range from -32768 to 32767.
O
p
erat
i
on
E
rror
In the following case, an operation error occurs, the error flag (SM0) is turned ON, and the
corresponding error code is stored to SD0.
• The value of the device specified for
is outside the range of 32768 to 32767.
(Error code: 4100)
WORD(P)
P: Executing condition
:
indicates any of the following
instructions.
WORD
WORDP
Input argument,
EN:
Executing condition
: Bit
s:
32-bit BIN data
: ANY32
Output argument,
ENO:
Execution result
: Bit
d:
Converted 16-bit BIN data
: ANY16
Setting
data
Internal device
R, ZR
J
\
U
\G
Zn
Constant
K, H
Others
Bit
Word
Bit
Word
−
−
−
U
n
i
versa
l
UD
Hi
g
h
Per
f
ormance
Structured ladder
ST
WORD
EN
ENO
s
d
WORD
(EN, s, d);
ENO:=
s
d
s
d
3
2-bi
t
B
IN
data
Upp
er
16 bi
ts
L
o
w
er
16 bi
ts
16-bi
t
B
IN
data
s
d
s
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......