317
4
4 Instructions 4.12.2 Bit Switch Access
M1
〔DSW X0 Y0
D0 K2 〕
X20
〔SET M1〕
M8029
〔RST M1〕
DECO: Data decoding
◆
Overview
The DECO instruction is used for data decoding.
DECO S D n
Data decoding Applicable model:
H3U
S
Data
source to
be decoded
Address of the word element that stores the source data,
or head address of bit elements
16-bit instruction (7
steps)
DECO: Continuous
execution
DECOP: Pulse
execution
D
Decoding
result
Address of the word element that stores the decoding
result, or head address of bit elements
n
Decoded
bit length
Number of consecutive bits from head address S to be
decoded
◆
Operands
Operand
Bit Element Word Element
System·User System·User Bit Designation Indexed Address Constant
Real
Number
S X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
D X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
n X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
Note: The elements in gray background are supported.
◆
Function
The values of the last n bits from head address S are calculated. The result is used as a bit pointer. The
corresponding bits of D are set to 1, and other bits are cleared.
The lower n (n ≤ 4) bits from head address S are decoded to the destination address. When n ≤ 3, the
destination higher bits are set to 0.
When n = 0, the instruction is not executed. When n is out of the range 0 to 8, an operation error will occur.
When n = 8, if D is a bit element, it has 256 bits.
When the driver input is OFF, the instruction is not executed but the ongoing decoding output continues.
The instruction of the pulse execution type is generally used.