Fb Calls - Siemens SINUMERIK 828D Function Manual

Hide thumbs Also See for SINUMERIK 828D:
Table of Contents

Advertisement

P3: Basic PLC Program for SINUMERIK 840D sl
13.15 Programming tips with STEP 7
Example
Code
FUNCTION FC 99: VOID
VAR_INPUT
Addr: POINTER;
END_VAR
BEGIN
NETWORK
TITLE =
L
P##Addr;
LAR1 ;
L
D [AR1,P#2.0];
LAR1 ;
END_FUNCTION
13.15.6

FB calls

Function
For optimizing the flow speeds, it is useful to call all function block calls with many static parameters, such as the
blocks FB 2, 3, 4, 5, and 7 provided by the basic program in start-up with the related instance parameters. In the
start-up (OB 100), the preassignment of the parameters must be done, which can then no longer be changed in
the cyclic part (OB 1). These fixed parameter values are no longer parameterized in the cyclic call, because they
have already been written in the Instance DB.
Example Parameterization of FB 2 with instance DB 110
The following example shows how a useful distribution in OB 100 and OB 1 portion is to be implemented.
First, the usual call in the cyclic program is displayed.
CALL FB 2, DB 110 (
Req :=
NumVar :=
Addr1 :=
Line1 :
Addr2 :=
Line2 .
Error :=
NDR :=
State :=
RD1 :=
RD2 :=
The modified version of the program call starts from here.
Here the call in OB 100 is displayed:
1084
Comment
//Points to variable
//Retrieve pointer from Addr
//Offset part of pointer of variable
M 100.0,
2,
NCVAR.C1_RP_rpa0_0
W#16#1
NCVAR.C1_RP_rpa0_0
W#16#2
M1.0,
M1.1,
MW 2,
P#M 4.0 REAL 1,
P#M 24.0 REAL 1,
//Read 2 variables
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
Basic Functions

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840d sl

Table of Contents