5 Configuring
11.92
5.2 FB 111 Neutral tool search
5.2
FB 111 WZ-SUCH
Neutral tool search
Description
This function block is a neutral search routine for tools; it must be parameterized and called up
by the user. It can be used, for example, for the tool search necessary during sort runs, both
for chain and cartridge magazines. The existing magazine/turret table is searched in
accordance with the parameter settings for search key, search screen form and search
direction.
The block derives the width of the search key from the block parameters und defines the data
words DW 0 and DW 1 of the magazine table depending on the search width and the search
key. Depending on the search direction selected, the block then calls one of the basic search
routines, i.e. FB 113, FB 114 or FB 115 (symmetrical, forward or backward search).
When utilizing the entire search area, the block supports the area of the standard list, starting
with the tool size - DB 151 - up to the Duplo No. - DB 156 - and the first data block of the user
list - DB 157 -, providing a user list was defined via the machine data.
The following rules should be adhered to when initializing the search key:
All search keys are optional, except for the search key "KEN2" (tool identifications). This
means:
Search key ><
-1
argument included in the search key,
Search key
=
-1
argument not included in the search key.
If an argument is not contained in the search key, any screen form assigned to the argument
is automatically inactive. The following parameters for forming a search key must always be
defined together:
KEN1 and MAS1
first identification DB
= DB 151 (MAS1 via internal interface),
KEN2 and MAS2
second identification DB = DB 152,
AW-1 and AWM1
first user DB
= DB 157,
T-R and DUNR
T and Duplo No.
= DB 154...DB 156.
The T No. may appear as an individual argument in the search key, whereas the Duplo No.
may only be included in connection with the T No. Certain information will be masked out by
the mask: the mask is anded with the current data value. The search key is then compared
with this result.
Example:
1 0 0 1 0 0 1 0 0
current DW
1 0 0 1 1 1 0 1 1
mask
1 0 0 1 0 0 0 0 0
anded result
1 0 0 1 0 0 0 0 0
Search key (result and search key are identical,
search key has been found)
Block data
Lib. No.
: E88530-B-5511-A
FBs to be loaded
: FB 111, FB 114, FB 115, FB 132
DBs to be loaded
: –
Type of FB call
: Conditional, unconditional
DBs to be input
: –
Error messages
: 01: End of magazine < Start of magazine
02: End of location < Start of location
10: No unassigned internal program channel found
5–2
© Siemens AG 1991 All Rights Reserved 6FC5 197-0AA40-1BP1
SINUMERIK 840/880 (PJ)