EasyManuals Logo

Mitsubishi MELSEC-Q/L User Manual

Mitsubishi MELSEC-Q/L
850 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #379 background imageLoading...
Page #379 background image
377
SORT, DSORT
1
2
3
4
4
6
7
8
7.5 Data processing instructions
7.5.12 SORT, DSORT
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.
Program Example
(1) The following program sorts the BIN 16-bit data from D0 to D3 in the ascending/descending order when X10 is turned
ON.
[Ladder Mode] [List Mode]
[Operation]
(2) The following program sorts the BIN 32-bit data from D0 to D9 in ascending/descending order when X10 is turned ON.
[Ladder Mode] [List Mode]
Error
code
Error details
Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4100
is 0 or a negative value.
4101
The range from S1 to (S1 + n/2 n) (including S1) overlaps the range
from D2 to D2 +1.
4101
For the SORT(P) instruction, the range of the device specified by
exceeds the range from S1 to S1 + n (including S1).
4101
For the DSORT(P) instruction, the range of the device specified by
exceeds the range from S1 to S1 + (2 n) (including S1).
S2
S1
S1
Step
Instruction
Device
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
Step
Instruction
Device

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELSEC-Q/L and is the answer not in the manual?

Mitsubishi MELSEC-Q/L Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC-Q/L
CategoryController
LanguageEnglish

Related product manuals