Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
19 Applied Instructions (Data Operation 2)
19.7 SORT2 / Sort Tabulated Data 2
513
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
11
Applied Instructions
(Data Operation)
12
Applied Instructions
(High Speed
Processing)
13
Applied Instructions
(Handy
Instruction)
14
Applied Instructions
(External FX I/O
Device)
15
Applied Instructions
(External Device
(optional device))
16
Applied Instructions
(External Device)
17
Applied Instructions
(Data Transfer 2)
18
Applied Instructions
(Floating Point)
19
Applied Instructions
(Data Operation 2)
20
Applied Instructions
(Positioning
Control)
Function and operation explanation
1. 16-bit operation (SORT2)
This instruction sorts the data rows of data table (sorting source) of (m1×m2) points from the device specified
by in the ascending order/descending order on the basis of group data of n rows, and stores in data
table (after sorting) of (m1×m2) points from the device specified by .
As for operation example, refer to 3. Operation examples.
The data table is composed of m1=K3, m2=K4 in the sorting source as explained in this case. In the data
table after sorting, exchange and .
1) Sorting is set depending on the ON/OFF state of M8165.
2) Data sorting is started when the instruction input is ON, and is completed after m1 scan, and instruction
execution complete flag M8029 is turned ON.
As for the manner of using the instruction execution complete flag, refer to section 1.3.4.
Number of groups m2 (in the case of m2=K4)
Column
number
1 2 3 4
Row
number
Management number Height Body weight Age
In the
case of
number of
data m1=3
1
+1 +2 +3
2
+4 +5 +6 +7
3
+8 +9 +10 +11
Setting of sorting order
M8165=ON Descending
M8165=OFF Ascending
SORT2
EN
s
m1
ENO
d
m2
n
Command
input
Head device for storing data table.
Number of data (rows)
Number of group data (columns)
Columns of group data (columns)
as reference for sorting
Head device for storing
the operation result.
Instruction execution complete flag
M8029
M