P3: Basic PLC Program for SINUMERIK 840D sl
13.13 Block descriptions
Basic Functions
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
969
Call example
Program selection in channel 1 (main program and workpiece program)
Entry of PI for DB 16 and STR for DB 124 with the S7 SYMBOL editor:
WVar2 INT -1 ... 32000 Duplo number of the tool to be positioned in the multitool
-1: Duplo number is irrelevant (then WVar1 must be
alternatively programmed)
WVar3 INT -1 ... 32000 Number of the multitool in which the empty location search/
testing should take place
-1: Search across all multitools for an empty location –
or check across all multitools whether the
programmed location is free in one of them to accept
the programmed tool
WVar4 INT -1 ... 999 Multitool location number of the location to which the system
should be positioned
-1: do not search for an empty location, but search for
an empty location within the multitool
Parameterization
Symbol Operand Data type
PI DB 16 DB 16
STR DB 124 DB 124
DATA_BLOCK DB 126 //Unassigned user DB, as instance for FB 4
FB 4
BEGIN
END_DATA_BLOCK
DATA_BLOCK DB 124
struct
PName: string[32]:= '_N_TEST_MPF ';
Path: string[32]:= '/_N_MPF_DIR/'; //Main program
PName_WST: string[32]:= '_N_ABC_MPF';
Path_WST: string[32]:= '/_N_WCS_DIR/
_N_ZYL_WPD';
//Workpiece program
end_struct
BEGIN
END_DATA_BLOCK
Function FC "PICall" : VOID
U I 7.7; //Unassigned machine control panel key
S M 0.0; //Activate req.
U M 1.1; //Done completed message
R M 0.0; //Terminate job
Parameterization
Signal Type Value range Meaning