Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
13 Applied Instructions (Handy Instruction)
13.10 SORT / SORT Tabulated Data
350
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
Function and operation explanation
1. 16-bit operation(SORT)
This command reshuffles the data table (reshuffling origin) composed of (m1×m2) points from the device
designated in in the ascending order in data columns on the basis of n rows of group data, and stores in
the data table (after reshuffling) of (m1×m2) points from the device designated in .
The data table composition is explained in an example of m1=K3, m2=K4 at the reshuffling origin. After
reshuffling, replace with in data table composition.
When the command input is turned ON, the data arraying is started, and after m1 scan, the data arraying is
completed, and the command execution complete flag M8029 is turned ON.
As for the method of using the command execution complete flag, see paragraph 1.3.4.
2. Operation examples
When the following reshuffling origin data is executed in "n=K2 (row number 2)" and "n=K3 (row number 3)",
the operation is as follows.
When a serial number such as management number is entered in the first row, it is convenient because you
can judge the original column number by its content.
Reshuffling origin data
Row
number
Group number m2 (in the case of m2=K4)
1 2 3 4
Column
number
Management number Height Weight Age
In the
case of
data
number
m1=K3
1
+3 +6 +9
2
+1 +4 +7 +10
3
+2 +5 +8 +11
Row
number
Group number m2 (in the case of m2=K4)
1 2 3 4
Column
number
Management
number
Height Weight Age
In the
case of
data
number
m1=K5
1
+5 +10 +15
1 150 45 20
2
+1 +6 +11 +16
2 180 50 40
3
+2 +7 +12 +17
3 160 70 30
4
+3 +8 +13 +18
410020 8
5
+4 +9 +14 +19
5 150 50 45
Command input
M8029
M
Command execution complete flag of SORT command
Command execution complete flag
SORT
EN
s
m1
ENO
d
m2
n
Beginning device
storing data table
Beginning device storing
operation results
Number of data
(columns)
Number of group
data (rows)
Row of group data
(rows) as basis of
reshuffling