AS Ser ies Pro gra mm in g M anu al
8.
When SM604 is OFF, the instruction sorts the data in ascending order. When SM604 is ON, the instruction sorts
the data in descending order.
9.
It is suggested that you use the pulse type instruction, FSORTP, instead of sorting repeatedly.
Example
5.
Suppose SM604 is OFF. When X0.0 switches from OFF to ON, the instruction sorts the data in ascending order.
6.
The data which to be sorted is as in the following table.
_6
Column
Row
1
2
3
4
5
6 - 4 1 6
Number of columns of data column x 2
1
2
Student
Chinese
number
(D0,D1) 1.0
(D10,D11) 90.0
(D2,D3) 2.0
(D12,D13) 55.0
(D4,D4) 3.0
(D14,D15) 80.0
(D6,D7) 4.0
(D16,D17) 70.0
(D8,D9) 5.0
(D18,D19) 95.0
columns of data
3
4
English
Math
(D20,D21) 75.0
(D30,D31) 66.0
(D22,D23) 65.0
(D32,D33) 54.0
(D24,D25) 98.0
(D34,D35) 89.0
(D26,D27) 60.0
(D36,D37) 99.0
(D28,D29) 79.0
(D38,D39) 75.0
5
Physics
(D40,D41) 79.0
(D42,D43) 63.0
(D44,D45) 90.0
(D46,D47) 50.0
(D48,D49) 69.0