395
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
14 Handy Instruction – FNC 60 to FNC 69
14.10 FNC 69 – SORT / SORT Tabulated Data
11
FN
C30-
FN
C39
R
o
ta
tion and
Sh
ift
12
FNC
4
0
-FNC49
D
a
ta
Op
e
ra
tio
n
13
FNC5
0
-FNC5
9
H
igh Speed
Pr
ocessi
ng
14
FM
C6
0
-F
NC6
9
H
and
y
In
st
ru
cti
o
n
15
FNC7
0
-FNC7
9
Ex
te
rn
a
l F
X
I
/O
D
evi
ce
16
FNC8
0
-FNC8
9
Ext
e
rnal
FX
D
evi
ce
17
F
N
C1
00
-F
NC
10
9
Da
ta
Tr
ansf
e
r 2
18
FN
C
110-FN
C
13
9
Fl
oat
ing P
o
in
t
19
FN
C
140-FN
C
149
Da
ta
O
per
at
io
n
2
20
FN
C
15
0-F
N
C
159
P
o
si
tioni
ng
C
ont
ro
l
• The data table configuration is explained in an example in which the sorting source data table has 3 lines
and 4 columns (m1 = K3, m2 = K4). For the sorting result data table, understand
as
.
• When the command input turns ON, data sorting is started. Data sorting is completed after "m1" scans,
and the instruction execution complete flag M8029 is set to ON.
→
For the instruction execution complete flag use method, refer to Subsection 6.5.2.
2. Operation examples
When the instruction is executed with "n = K2 (column No. 2)" and "n = K3 (column No. 3) for the following
sorting source data, the operations shown below are acquired.
The operation examples below indicate 16-bit operations. In the case of 32-bit operation, construct the data
table with 32-bit binary data.
It is recommended to put a serial number such as a control number in the first column so that the original line
number can be estimated based on the contents.
Sorting source data
1) Sorting result when the instruction is executed with "n = K2 (column No. 2)"
Column No.
Number of groups (m2 = K4)
1
2
3
4
Line No.
Control number
Height
Weight
Age
Number of
data
(m1 = 3)
1
+1
+2
+3
2
+4
+5
+6
+7
3
+8
+9
+10
+11
Column No.
Number of groups (m2 = K4)
1
2
3
4
Line No.
Control number
Height
Weight
Age
Number of
data
(m1 = 5)
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
4
100
20
8
5
+ 4
+ 9
+ 14
+ 19
5
150
50
45
Column No.
1
2
3
4
Line No.
Control number
Height
Weight
Age
1
+ 5
+ 10
+15
4
100
20
8
2
+ 1
+ 6
+ 11
+ 16
1
150
45
20
3
+ 2
+ 7
+ 12
+ 17
5
150
50
45
4
+ 3
+ 8
+ 13
+ 18
3
160
70
30
5
+ 4
+ 9
+ 14
+ 19
2
180
50
40
D
1
S
D
1
D
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D