Mitsubishi MELSEC Q Series Programming Manual page 472

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

SORT,DSORT
Program Example
(1) The following program sorts the BIN 16-bit data in 10 points from D0 in the ascending/
descending order when X10 is turned ON.
[Ladder Mode]
[Operation]
Data before sort
D0
D1
D2
D3
(2) The following program sorts the BIN 32-bit data in 20 points from D0 in ascending/
descending order when X10 is turned ON.
[Ladder Mode]
[Operation]
D1, D0
D3, D2
D5, D4
D7, D6
D9, D8
7-98
X0
OFF
100
-1
12345
-999
X0
ON
Data before sort
X0
OFF
456789
-1111
5000
-1
-99999
X0
ON
[List Mode]
Step
Instruction
Data after sort
D0
-999
D1
-1
100
D2
12345
D3
D0
12345
D1
100
-1
D2
-999
D3
[List Mode]
Step
Instruction
Data before sort
D1, D0
-99999
D3, D2
-1111
D5, D4
1
5000
D7, D6
456789
D9, D8
D1, D0
456789
D3, D2
5000
D5, D4
1
-1111
D7, D6
D9, D8
-99999
Device
Device

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents