Specifications
SIMATIC Instructions
9-107
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
Table Find Example
LAD STL
I2.1
TBL_FIND
EN
SRC
PTN
VW202
16#3130
LD I2.1
FND= VW202, 16#3130, AC1
INDXAC1
CMD1
When I2.1 is on,
search the table for a
value equal to
3130 HEX.
Application
0006
VW202
3133
VW204
4142
3130
VW206
VW208
3030
VW210
3130
4541
VW212
VW214
EC (entry count)
d0 (data 0)
d1 (data 1)
d2 (data 2)
d3 (data 3)
d4 (data 4)
d5 (data 5)
This is the table you are searching. 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.
0AC1 AC1 must be set to 0 to search from the top of table.
2AC1
AC1 contains the data entry number corresponding to the first
match found in the table (d2).
Execute table search
3AC1
Increment the INDX by one, before searching the remaining
entries of the table.
4AC1
AC1 contains the data entry number corresponding to the second
match found in the table (d4).
Execute table search
5AC1
Increment the INDX by one, before searching the remaining entries
of the table.
6AC1
AC1 contains a value equal to the entry count. The entire table has
been searched without finding another match.
Execute table search
0AC1
Before the table can be searched again, the INDX value must be
reset to 0.
FBD
I2.1
TBL_FIND
EN
SRC
PTN
VW202
INDXAC1
CMD1
ENO
ENO
16#3130
Figure 9-34 Example of Find Instructions for LAD, STL, and FBD