Справочник Пользователя для Mitsubishi Electronics FXCPU

Скачать
Страница из 838
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
FX
3U(C)
FX
3G(C)
FX
3S
FX
2N(C)
FX
1N(C)
FX
1S
FX
U
/FX
2C
FX
0N
FX
0(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
X Y M T C S D
.b KnX KnY KnM KnS T C D R U
\G
V Z Modifier K H
E
"
"
P
z z
z z
z z
z z
z z
z z
z z
SORT2
EN
s
m1
ENO
d
m2
n
DSORT2
EN
s
m1
ENO
d
m2
n