Detailed description
2.12 Block descriptions
Power Line Basic PLC Program (P3)
2-142 Function Manual, 08/2005 Edition, 6FC5397-0BP10-0BA0
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:
Parameterization:
Symbol Operand Data type
PI DB16 DB16
STR DB124 DB124
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_WKS_DIR/_N_ZYL_WPD';
//Workpiece program
end_struct
BEGIN
END_DATA_BLOCK
Function FC "PICall" : VOID
call fb4,db126(
I 7.7; //Unassigned machine control panel key
S M 0.0; //Activate req.
V M 1.1; //Done completed message
R M 0.0; //Terminate job
V I 7.6; //Manual error acknowledgment
V M 1.0; //Error pending
R M 0.0; //Terminate job
Req := M0.0,
PIService
:=
PI.SELECT,
Unit := 1, // CHAN 1
Addr1 := STR.Path,
Addr2 := STR.PNam
e,
//Main-program
selection