Conversion From Bin 32-Bit To Bin 16-Bit Data (Word, Wordp) - Mitsubishi MELSEC QCPU Programming Manual

Programmable logic controller
Table of Contents

Advertisement

6 BASIC INSTRUCTIONS

6.3.6 Conversion from BIN 32-bit to BIN 16-bit data (WORD, WORDP)

Internal Devices
Set
(System, User)
Data
Bit
Word
S
D
[Instruction Symbol] [Execution Condition]
WORD
WORDP
[Set Data]
Set Data
S
D
[Functions]
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 Errors]
(1) In the following cases an operation error occurs, the error flag (SM0) turns ON, and an error
code is stored at SD0.
• The contents of the data designated by
[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]
6 - 66
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
MELSECNET/10(H)
File
Direct J \
Register
Bit
Command
Command
Head number of device where BIN 32-bit data is stored
Head number of device where BIN 16-bit data will be stored after
conversion
.
D
+1
S
S
The upper 16 bits
The lower 16 bits
BIN 32 bit data
S
WORD R100
D100
R101
R100
FFFF8253
H
(-32173)
QCPU
PLC CPU
Basic
High Performance
Usable Devices
Special
Function
Module
Word
U \G
WORD
WORDP
Meaning
to BIN 16-bit data with sign, and stores the
S
D
BIN 16 bit data
+1 and
are outside the -32768 and 32767 range. (Error code: 4100)
S
[List Mode]
Instruction
Steps
WORD P
D100
8253
H
(-32173)
MELSEC-Q/QnA
QnA
Process CPU
Index
Constant
Register
Other
K, H
Zn
S
D
S
D
Data Type
BIN 32 bits
BIN 16 bits
Device
R100
D100
6 - 66
Q4AR

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec qnacpuMelsec q modeMelsec q series

Table of Contents