Call example
Writing of three channelspecific machine data of channel 1:
Select the three data with NC VAR selector and store in the file DB120.VAR:
Area
C[1]
C[1]
C[1]
Entry NCVAR for DB 120 with the S7 SYMBOL Editor:
Symbol
NCVAR
File DB120.AWL must be compiled and transferred to the PLC.
Call and parameterization of FB 3 with instance DB 111:
DATA_BLOCK DB 111
FB 3
BEGIN
Function FC "VariablenCall": VOID
END_DATA_BLOCK
Basic logic functions: PLC Basic program powerline (P3 pl)
Function Manual, 11/2006, 6FC5397-0BP10-2BA0
Block
Name
RP
rpa[5]
RP
rpa[11]
RP
rpa[14)
Operand
DB120
U
I 7.7;
S
M 100.0;
U
M 100.1;
R
M 100.0;
U
I 7.6;
U
M 102.0;
R
M 100.0;
CALL FB 3, DB 111 (
Req :=
NumVar :=
Addr1 :=
Addr2 :=
Addr3 :=
FMNCno :=
Error :=
Done :=
State :=
SD1 :=
SD2 :=
SD3 :=
Type
double
double
double
//Unassigned user DB, as instance for FB 3
//Unassigned machine control panel key
//Activate req.
//Done completed message
//Terminate job
//Manual error acknowledgment
//Error pending
//Terminate job
M 100.0,
3,
NCVAR.rpa_5C1RP,
NCVAR.rpa_11C1RP,
NCVAR.rpa_14C1RP,
1,
M102.0,
M100.1,
MW104,
P#DB99.DBX0.0 REAL 1,
P#DB99.DBX4.0 REAL 1,
P#M110.0 REAL 1);
Detailed description
2.12 Block descriptions
Byte S7 Name
4
rpa_5C1RP
4
rpa_11C1RP
4
rpa_14C1RP
Data type
DB 120
//Write 3 variables
123