Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
13 Applied Instructions (Handy Instruction)
13.10 SORT / SORT Tabulated Data
349
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)
13.10 SORT / SORT Tabulated Data
Outline
This command reshuffles the data table composed of data (columns) and group data (rows) in the ascending
order in column unit on the basis of designated group data (rows). In this command, the group data (rows) is
stored in continuous devices. Similarly, in SORT2 command, data (columns) is stored in continuous devices,
so that the data (columns) may be added easily, and reshuffling is applicable in both ascending order and
descending order.
As for SORT2 command, see paragraph 19.7.
1. Format and operation, execution form
2. Set data
3. Applicable devices
S: Refer to "Cautions".
FX3U(C) FX3G(C) FX3S FX2N(C) FX1N(C) FX1S FXU/FX2C FX0N FX0(S)
Instruction
name
Operation
Execution
form
Expression in each language
Structured ladder/FBD ST
SORT 16 bits Continuous SORT(EN, s, m1, m2, n, d);
Variable Description Data type
Input
variable
EN Execution condition Bit
Beginning device storing data table (m1xm2 points occupied) ANY16
Number of data (columns) ANY16
Number of group data (rows) ANY16
Row of group data (rows) as basis of reshuffling ANY16
Output
variable
ENO Execution state Bit
Beginning device storing arithmetic results (m1 × m2 points occupied) ANY16
Operand
type
Bit Devices Word Devices Others
System user Digit designation
System
user
Special
unit
Index
Cons
tant
Real
number
Character
string
Pointer
XYMTCS
D.b
KnX KnY KnM KnS T C D R
U\G
V Z Modifier K H E
""
P
z
S1
zz
zz
z
S1
zz
z
S1
SORT
EN
s
m1
ENO
d
m2
n