E L C P r o g r a m m i n g M a n u a l
F o r m o r e i nf o r m a t i o n v i sit :
w w w. e a t o n . c o m
MN05003003E
3-180
Program Example:
1.
When X0=ON, the data stack D10~D19 is compared against D0 and the result is stored in
D50~D54. If there are no equal values, the contents of D50~D52 will be 0.
2.
The offset into the data file of the largest value of all compared data will be stored in D54 and
the offset into the data file of the smallest value of all compared data will be stored in D53.
When there are more then one largest value and/or smallest value, only the last location in the
data file will be recorded for each. For example, if there were a K5 in D17 and D18 in the table
below, the value stored in D53 will be 8 instead of 7. This is because the last occurance of the
smallest value in this case is in position 8 in the data file.
X0
SER
D10
D0
D50
K10
S
1
Content
value
Compare
data
Data
number
Result
D
Content
value
Explanation
D10
88
0
D50
4
The number of matches found
D11 100
1 Equal
D51
1
The offset into the file where the
first match is located
D12 110
2
D52
8
The offset into the file where the
last match is located
D13 150
3
D53
7
The offset into the file where the
smallest value is located
D14 100
4 Equal
D54
9
The offset into the file where the
largest value is located
D15 300
5
D16 100
6 Equal
D17 5
7 Smallest
D18 100
8 Equal
D19 500
S
2
D0=K100
9 Largest
n
Summary of Contents for ELC-PB
Page 1: ......
Page 5: ...For more information visit www eaton com MN05003003E iv...
Page 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Page 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Page 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Page 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...