ENCO(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.
• The range 2
• All data 2
Program Example
(1) The following program encodes the 3 bits from M10 when X20 is ON, and stores the results
at D8.
[Ladder Mode]
[Operation]
7-74
n
bits from
exceeds the range of the relevant device.
S
n
bits from
is "0".
S
M17
0
0
0
0
If 3 bits are designated as significant bits, 8 points are occupied.
Storage device D8
0
0
0
0
0
0
0
0
The location of the ON bit, counted from M10, is stored in BIN.
[List Mode]
Step
Instruction
M10
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
1
(Error code: 4100)
(Error code: 4101)
(Error code: 4100)
Device
Encoding result