7-72
DECO(P)
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and
an error code is stored into SD0.
• The value of n is not in the 0 to 8 range. (Error code: 4100)
• The range 2n bits from exceeds the range of the relevant device.
(Error code: 4101)
Program Example
(1) The following program decodes the 3 bits from X0 and stores the results at M10 when X20 is
ON.
[Ladder Mode] [List Mode]
[Operation]
D
Step
Instruction
Device
0 0 0 0 01 0 0 000
M10M17
0
If 3 bits are designated as significant bits, 8 points are occupied.
Decoding result
00
11
0
X0X1X2
When 6 is designated at X0 to X2