Справочник Пользователя для Mitsubishi Electronics MELSEC -Q/L
7 APPLICATION INSTRUCTIONS
7.5 Data Processing Instructions
423
7
Decoding from 8 to 256 bits
DECO(P)
Processing details
• Turns ON the bit position of (D), which corresponds to the binary value designated by the lower n bits at (S).
• The value of n can be designated between 1 and 8.
• No processing is conducted if n = 0, and there are no changes in the details of the device designated at (D).
• Bit devices are treated as 1 bit, and word devices as 16 bits.
• No processing is conducted if n = 0, and there are no changes in the details of the device designated at (D).
• Bit devices are treated as 1 bit, and word devices as 16 bits.
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.
(S): Data to be decoded or the number of the device where the data to be decoded is stored (BIN 16 bits)
(D): Head number of the devices where the decoding result will be stored (Device name)
n:
(D): Head number of the devices where the decoding result will be stored (Device name)
n:
Valid bit length (1 to 8), 0: No processing (BIN 16 bits)
Setting
data
data
Internal device
R, ZR
J\
U\G
Zn
Constant
K, H
K, H
Others
Bit
Word
Bit
Word
(S)
(D)
n
Error
code
code
Error details
Q00J/
Q00/
Q01
Q00/
Q01
QnH
QnPH
QnPRH QnU
LCPU
4100
The value of n is other than 0 to 8.
4101
The range 2
n
bits from (D) exceeds the range of the corresponding device.
The range n bits from (S) exceeds each setting area of the corresponding
device.
device.
Basic
Process
High
performance
Redundant Universal
LCPU
n
n
DECO
DECOP
D
D
Command
Command
DECOP
DECO
S
S
7
0 1
0 1
ON
0 0 0 0 0 0
1 1 0
6 5 4 3 2 1 0
D
(Binary value = 6)
n = 3
S