Table Find - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

7.16.4

Table find

LAD / FBD
STL
FND= TBL, PTN,
INDX
FND<> TBL, PTN,
INDX
FND< TBL, PTN,
INDX
FND> TBL, PTN,
INDX
Non-fatal errors with ENO = 0
0006H Indirect address
0091H Operand out of range
Input / output
Data type
TBL
WORD
PTN
INT
INDX
WORD
CMD
BYTE
Note
When you use the table find instruction with tables generated with the Add-to-table, Last-in-
first-out, and First-in-first-out instructions, the entry count and the data entries correspond
directly. The maximum-number-of-entries word required for the Add-to-table, Last-in-first-out,
or First-in-first-out instructions is not required by the Table find instruction. See the following
figure.
Consequently, you should set the TBL operand of a Find instruction to one-word address
(two bytes) higher than the TBL operand of a corresponding the Add-to-table, Last-in-first-
out, or First-in-first-out instruction.
S7-200 SMART
System Manual, V2.3, 07/2017, A5E03822230-AF
Description
The Table Find instruction searches a table for data that matches your search
criteria. The Table Find instruction searches the table TBL, starting with the
table entry INDX, for the data value or pattern PTN that matches the search
criteria defined by CMD. The command parameter CMD is given a numeric
value of 1 to 4 that corresponds to =, <>, <, and >, respectively.
If a match is found, the INDX points to the matching entry in the table. To find
the next matching entry, the INDX must be incremented before invoking the
table find instruction again. If a match is not found, the INDX has a value equal
to the entry count.
A table can have up to 100 data entries. The data entries (area to be searched)
are numbered from 0 to a maximum value of 99.
SM bits affected
None
Operand
IW, QW, VW, MW, SMW, SW, T, C, LW, *VD, *LD, *AC
IW, QW, VW, MW, SMW, SW, T, C, LW, AC, AIW, *VD, *LD, *AC, Constant
IW, QW, VW, MW, SMW, SW, T, C, LW, AC, *VD, *LD, *AC
Constant:
1 = Equal (=)
2 = Not Equal (<>)
3 = Less Than (<)
4 = Greater Than (>)
Program instructions
7.16 Table
373

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents