Detailed description
2.12 Block descriptions
Basic logic functions: PLC basic program solution line (P3 sl)
112 Function Manual, 11/2006, 6FC5397-0BP10-2BA0
S7 (ALIAS) names have been selected in order to:
• Incorporate the channel designation into the name
and
• Remove the characters [ ], which are not legal in a STEP 7 symbol.
Entry of the name in the S7 SYMBOL table (e.g. NCVAR for DB120):
Symbol Operand Data type
NCVAR DB 120 DB 120
File DB120.AWL must be compiled and transferred to the PLC.
Parameterization of FB 2 with instance DB 110:
DATA_BLOCK DB 110
//Unassigned user DB, as instance for FB 2
FB 2
BEGIN
END_DATA_BLOCK
Function FC "VariablenCall": VOID
U I 7.7; //Unassigned machine control panel key
S M 100.0; //Activate req.
U M 100.1; //NDR completed message
R M 100.0; //Terminate job
U I 7.6; //Manual error acknowledgment
U M 102.0; //Error pending
R M 100.0; //Terminate job
CALL FB 2, DB 110 (
Req := M 100.0,
NumVar := 3, //Read 3 variables
Addr1 := NCVAR.C1AxConfMachAxUsed1,
Addr2 := NCVAR.C1AxConfMachAxUsed2,
Addr3 := NCVAR.C1SpindDefMasterSpind,
Error := M102.0,
NDR := M100.1,
State := MW104,
RD1 := P#DB99.DBX0.0 BYTE 1,
RD2 := P#DB99.DBX1.0 BYTE 1,
RD3 := P#M110.0 INT 1);