Difference In Table Format Between Find Instructions And Att, Lifo, Fifo - Siemens SIMATIC S7-200 System Manual

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

Advertisement

Table Find
L
TBL_FIND
A
D
EN
F
TBL
B
D
PTN
INDX
CMD
S
FND=
T
L
FND<> TBL, PATRN,
FND<
FND>
221
222 224
Inputs/Outputs
SRC
VW, IW, QW, MW, SMW, LW, T, C, *VD, *AC, *LD
PTN
VW, IW, QW, MW, SW, SMW, AIW, LW, T, C, AC, Constant, *VD,
*AC, *LD
INDX
VW, IW, QW, MW, SW, SMW, LW, T, C, AC, *VD, *AC, *LD
CMD
Constant
Note
When you use the Find instructions with tables generated with ATT, LIFO, and
FIFO instructions, the entry count and the data entries correspond directly. The
maximum-number-of-entries word required for ATT, LIFO, and FIFO is not
required by the Find instructions. Consequently, the SRC operand of a Find
instruction is one word address (two bytes) higher than the TBL operand of a
corresponding ATT, LIFO, or FIFO instruction, as shown in Figure 9-32
Table format for ATT, LIFO, and FIFO
VW200
VW202
VW204
VW206
VW208
VW210
VW212
VW214
Figure 9-32
S7-200 Programmable Controller System Manual
A5E00066097-02
The Table Find instruction searches the table (TBL),
starting with the table entry INDX, for the data value
(PTN) that matches the search criteria defined by CMD.
ENO
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
TBL, PATRN
has a value equal to the entry count.
INDX
A table may have up to 100 data entries. The data
INDX
entries (area to be searched) are numbered from 0 to a
TBL, PATRN,
maximum value of 99.
INDX
TBL, PATRN,
Error conditions that set ENO = 0: SM4.3 (run-time),
INDX
0006 (indirect address), 0091 (operand out of range)
226
Operands
0006
TL (max. no. of entries)
0006
EC (entry count)
xxxx
d0 (data 0)
xxxx
d1 (data 1)
xxxx
d2 (data 2)
xxxx
d3 (data 3)
xxxx
d4 (data 4)
xxxx
d5 (data 5)

Difference in Table Format between Find Instructions and ATT, LIFO, FIFO

SIMATIC Instructions
Data Types
WORD
INT
WORD
BYTE
.
Table format for TBL_FIND
VW202
0006
EC (entry count)
VW204
xxxx
d0 (data 0)
VW206
xxxx
d1 (data 1)
VW208
xxxx
d2 (data 2)
VW210
xxxx
d3 (data 3)
VW212
xxxx
d4 (data 4)
VW214
xxxx
d5 (data 5)
9-109

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents