Mitsubishi Electronics FX3G User Manual

Page of 964
400
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
14 Handy Instruction – FNC 60 to FNC 69
14.2 FNC 61 – SER / Search a Data Stack
2) Operation example
a) Example of search result table configuration and data
b) Search result table
2. 32-bit operation (DSER and DSERP)
In "n" data starting from [
+1, 
], same data as [
+1, 
] is searched, and the search result is
stored to [
+1, 
] to [
+9, 
+8].
1) Contents of searched data and the search result
a) When same data was detected
Five 32-bit devices starting from [
+1, 
] store the number of same data, first position, last position,
maximum value position and minimum value position.
b) When same data was not detected
Five 32-bit devices starting from [
+1, 
] store the number of same data, first position, last position,
maximum value position and minimum value position.
In this case, however, "0" is stored in three devices starting from [
+1, 
] (which store the number of
same data, first position and last position).
Searched device 
Searched data
 value 
(example)
Comparison data
 value 
(example)
Data 
position
Search result
Maximum value 
+ 4
Same 
Minimum value 
+ 3
K100
K100
0
 (first 
position)
+ 1
K111
1
+ 2
K100
2
+ 3
K 98
3
+ 4
K123
4
+ 5
K 66
5
+ 6
K100
6
 (last 
position)
+ 7
K 95
7
+ 8
K210
8
+ 9
K 88
9
Device number
Contents
Search result item
3
Number of same data
+ 1
0
Same data position (first position)
+ 2
6
Same data position (last position)
+ 3
5
Minimum value position (last position)
+ 4
8
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
  D
  D
  D
  D
  D
  
S
1
  
S
1
  
S
2
  
S
2
   
D
   
D
   
D
   
D
Command
input
FNC 61
DSER
n
S
S
S
+1, S
S
+1, S
+1,
  
D
1
   
D
  
D
1
   
D
  
D
1
   
D
  
D
1
   
D
  
D
1
   
D
  
D
1
   
D