Siemens SIMATIC S7-200 System Manual page 208

Programmable controller
Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

S7-200 Programmable Controller System Manual
Example: Table Find Instruction
When I2.1 is on, search the table for
a value equal to 3130 HEX.
VW202
0006
VW204
3133
VW206
4142
VW208
3130
VW210
3030
VW212
3130
VW214
4541
If the table was created using ATT,
LIFO, and FIFO instructions, VW200
contains the maximum number of
allowed entries and is not required by
the Find instructions.
194
AC1
Execute table search
EC (entry count)
AC1
d0 (data 0)
d1 (data 1)
d2 (data 2)
d3 (data 3)
AC1
d4 (data 4)
d5 (data 5)
Execute table search
AC1
AC1
Execute table search
AC1
AC1
Network 1
LD
I2.1
FND=
VW202, 16#3130, AC1
0
AC1 must be set to 0 to
search from the top of table.
AC1 contains the data entry
number corresponding to the
2
first match found in the table (d2).
Increment the INDX by one,
3
before searching the
remaining entries of the table.
AC1 contains the data entry number
corresponding to the second
4
match found in the table (d4).
Increment the INDX by one, before
5
searching the remaining entries
of the table.
AC1 contains a value equal to the entry
count. The entire table has been searched
6
without finding another match.
Before the table can be searched
0
again, the INDX value must be reset to 0.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents