EasyManua.ls Logo

Vigor VS Series - Page 200

Vigor VS Series
484 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
194
D PS E R
S1 S 2
D
n
FNC
61
1
2
M
3
X Y M S
D.b R.b
KnX KnY
KnM KnS
T C
D,R
V,Z
UnG
K,H
E
" $"
S1
D
S2
n
SER D0 D10 D20 K10
X20
S1 S 2
D
n
Operand
Devices
Search a Data Stack
The 16-bit instruction, n = 1~256, S1 occupies n components, D occupies 5 components.
The 32-bit instruction, n = 1~128, S1 occupies (2×n) components, D occupies 10 components
S1 : the head device ID number of a defined data stack
to be searched
S2 : the compare data source at the searching
D : the search result's storage head device ID number
n : the search stack length of the searched data
The data stack is assigned by consecutive devices which headed with . This instruction will compare the
content value at the specified to each device in the data stack, and store the comparison result into 5
consecutive devices headed with .
n
S2
D
S1
For a search data stack formed by D0 ~ D9. When X20= “ON”, this instruction uses the D10 to compare with the
stack D0~D9 and store the result into D20 ~ D24. (Assune the content value of parameter D10=100.)
Equal value
D0
D1
D2
D3
D4
D5
D6
D7
D8
D9
100
120
100
85
125
60
100
95
100
210
D10
100
0
1
2
3
4
5
6
7
8
9
n
S2
S1
Data
Position
Number
Data
Stack for
Searching
Content
Value of
D0 ~ D9
Compare
Data
Source
Compare
Decision
Equal Value
Max. Value
Equal Value
Equal Value
Min. Value
Total number of the equal
comparison result
D21
D22
D23
D24
4
0
8
5
9
D20
D
Result
Storage
Device
Content
Value
Description
Data position number of the
first equal value
Data position number of the
last equal value
The Min. value data position
number
The Max. value data position
number
All the content values of D20 ~ D22 will be “0” when there’s no equal value.
For a 32-bit instruction, , and will designate a 32-bit register while will designate a 16-bit register.
The content value at the +3 and +4 will record the larger data position number when there’s more than
one minimum or maximum value in the data stack.
D
S1
D
n
S2
The result of the search
D

Table of Contents