Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
19 Applied Instructions (Data Operation 2)
19.7 SORT2 / Sort Tabulated Data 2
512
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
19.7 SORT2 / Sort Tabulated Data 2
Outline
This instruction sorts the data table composed of data (rows) and group data (columns) in the ascending
order/descending order in row unit on the basis of the specified group data (rows). In this instruction, data
(row direction) is stored in continuous devices, and it is easy to add the data (row).
In SORT, sorting is in ascending order only, and data composition is different (data is composed in devices
continuous in row direction).
As for SORT, refer to section 13.10.
1. Format and operation, execution form
2. Set data
3. Applicable devices
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
SORT2 16 bits Continuous SORT2(EN,s,m1,m2,n,d);
DSORT2 32 bits Continuous DSORT2(EN,s,m1,m2,n,d);
Variable Description
Data type
16-bit
operation
32-bit
operation
Input
variable
EN Execution condition Bit
Head device for storing data table [m1 × m2 points occupied] ANY16 ANY32
Number of data (rows) [1 to 32] ANY16 ANY32
Number of group data (columns) [1 to 6] ANY16 ANY32
Columns of group data (columns) as reference for sorting [1 to m2] ANY16 ANY32
Output
variable
ENO Execution state Bit
Head device for storing operation result [m1 × m2 points occupied] ANY16 ANY32
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
VZModifierKH E
""
P
zz
zz zz
zz
zz zz
zz
SORT2
EN
s
m1
ENO
d
m2
n
DSORT2
EN
s
m1
ENO
d
m2
n