Specifications

SIMATIC Instructions
9-131
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
Decode
The Decode instruction sets the bit in the output word
(OUT) that corresponds to the bit number represented by
the least significant “nibble” (4 bits) of the input byte (IN).
All other bits of the output word are set to 0.
Error conditions that set ENO = 0: SM4.3 (run-time),
0006 (indirect address)
Inputs/Outputs Operands Data Types
IN VB, IB, QB, MB, SMB, LB, SB, AC, Constant, *VD, *AC, *LD BYTE
OUT VW, IW, QW, MW, SMW, LW, SW, AQW, T, C, AC, *VD, *AC, *LD WORD
Encode
The Encode instruction writes the bit number of the least
significant bit set of the input word (IN) into the least
significant “nibble” (4 bits) of the output byte (OUT).
Error conditions that set ENO = 0: SM4.3 (run-time),
0006 (indirect address)
Inputs/Outputs Operands Data Types
IN VW, T, C, IW, QW, MW, SMW, AC, LW, AIW, Constant, *VD, *AC,
SW, *LD
WORD
OUT VB, IB, QB, MB, SMB, LB, AC, *VD, *AC, SB, *LD BYTE
L
A
D
DECO
EN
IN OUT
F
B
D
ENO
S
T
L
DECO IN, OUT
222 224
333
221
L
A
D
S
T
L
ENCO IN, OUT
ENCO
EN
IN OUT
F
B
D
ENO
222 224
333
221