Siemens Simatic S7-200 System Manual page 206

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
VW204
VW206
VW208
6
VW210
VW212
VW214
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
EC (entry count)
0006
d0 (data 0)
3133
4142
d1 (data 1)
3130
d2 (data 2)
3030
d3 (data 3)
3130
d4 (data 4)
4541
d5 (data 5)
Network 1
LD
I2.1
FND=
VW202, 16#3130, AC1
AC1
0
AC1 must be set to 0 to search from the top of
table.
Execute table search
AC1 contains the data entry number
AC1
2
corresponding to the first match found in the
table (d2).
Increment the INDX by one, before searching
AC1
3
the remaining entries of the table.
Execute table search
AC1 contains the data entry number
AC1
4
corresponding to the second match found in
the table (d4).
Increment the INDX by one, before searching
AC1
5
the remaining entries of the table.
Execute table search
AC1 contains a value equal to the entry count.
AC1
6
The entire table has been searched without
finding another match.
Before the table can be searched again, the
AC1
0
INDX value must be reset to 0.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents