446
7 APPLICATION INSTRUCTIONS
7.5 Data Processing Instructions
• 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 following program sorts the BIN 16-bit data from D0 to D3 in the ascending/descending order when X10 is turned ON.
Error
code
Error details Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4100 (S2) is 0 or a negative value.
The values of (D2) used in the system at the 2nd scan or later are more than
n.
The values of (D2) used in the system at the 2nd scan or later are
(D2)<(D2)+1.
4101 The range from (S1) to (S1)+n (including (S1)) overlaps the range from (D2)
to (D2)+1.
For the SORT(P) instruction, the range of the device specified by (S1)
exceeds the range from (S1) to (S1)+n (including (S1)).
For the DSORT(P) instruction, the range of the device specified by (S1)
exceeds the range from (S1) to (S1)+(2n) (including (S1)).
[Ladder Mode] [List Mode]
[Operation]
Data before sort
Data after sort
-999
-1
12345
100
12345
-1
100
-999
-999
100
-1
12345
D1
D2
D3
D0
D1
D2
D3
D0
D1
D2
D3
D0
X0 OFF
X0 ON