401
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
14 Handy Instruction – FNC 60 to FNC 69
14.2 FNC 61 – SER / Search a Data Stack
11
FNC30-FNC39
Rotation and
Shift
12
FNC40-FNC49
Data Operation
13
FNC50-FNC59
High-Speed
Processing
14
FMC60-FNC69
Handy
Instruction
15
FNC70-FNC79
External FX I/O
Device
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
2) Operation example
a) Example of search result table configuration and data
b) Search result table
Cautions
• Comparison of values
It is executed algebraically.
(example: −10 < 2)
• When there are two or more maximum or minimum values
When there are two or more maximum or minimum values in the searched data, the last position of the max/min is
stored respectively.
• Number of occupied devices
When this instruction is driven, the following number of devices are occupied for storing the search result .
Make sure that such devices are not used in other controls for the machine.
1)In the case of 16-bit operation
Five devices, , +1, +2, +3 and +4, are occupied.
2)In the case of 32-bit operation
Ten devices, [ +1, ], [ +3, +2], [ +5, +4], [ +7, +6] and [ +9,
+8], are occupied.
• Note that the 32-bit value [n+1, n] is valid when D or R is specified as "n" in a 32-bit instruction.
In the case of "DSER D0 D100 D200 R0", "n" is [R1, R0].
Searched device
Searched data
value
(example)
Comparison
data
Data
position
Search result
Maximum
value
+9, +8
Same
Minimum
value
+7, +6
[+ 1,]
K100000
K100000
0
(first
position)
[+ 3,+ 2]
K110100 1
[+ 5,+ 4]
K100000 2
[+ 7,+ 6]
K 98000 3
[+ 9,+ 8]
K123000 4
[ + 11, + 10]
K 66000 5
[ + 13, + 12]
K100000 6
(last
position)
[ + 15, + 14]
K 95000 7
[ + 17, + 16]
K910000 8
[ + 19, + 18]
K910000 9
Device number Contents Search result item
[+ 1, ]
3 Number of same data
[+ 3, + 2]
0 Same data position (first position)
[+ 5, + 4]
6 Same data position (last position)
[+ 7, + 6]
5 Minimum value position (last position)
[+ 9, + 8]
9 Maximum value position (last position)
S
1
S
1
S
2
D
D
D
S
1
S
1
S
1
S
1
S
1
S
1
S
1
S
1
S
1
S
1
S
1
S
1
S
1
S
1
S
1
S
1
S
1
S
1
S
1
S
1
D D
D D
D D
D D
D D
D
1
D
D
1
D
D
1
D
D
1
D
D
1
D
D
1
D
D
1
D
D
1
D
D
1
D
D
1
D
D
1
D
D
1
D
D
1
D
D
1
D
D
1
D
D
1
D