Statement List (STL) - DCE FEL ČVUT v Praze
Statement List (STL) - DCE FEL ČVUT v Praze
Statement List (STL) - DCE FEL ČVUT v Praze
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
10.5 CALL Block Call<br />
Format<br />
Description<br />
CALL <br />
Program Control Instructions<br />
CALL is used to call functions (FCs) or function blocks<br />
(FBs), system functions (SFCs) or system function blocks (SFBs) or to call the<br />
standard pre-programmed blocks shipped by Siemens. The CALL instruction calls<br />
the FC and SFC or the FB and SFB that you input as an address, independent of the<br />
RLO or any other condition. If you call an FB or SFB with CALL, you must provide the<br />
block with an associated instance DB. The calling block program continues logic<br />
processing after the called block is processed. The address for the logic block can be<br />
specified absolutely or symbolically. Register contents are restored after an<br />
SFB/SFC call.<br />
Example: CALL FB1, DB1 or CALL FILLVAT1, RECIPE1<br />
Logic Block Block Type Absolute Address Call<br />
Syntax<br />
FC Function CALL FCn<br />
SFC System function CALL SFCn<br />
FB Function block CALL FBn1,DBn2<br />
SFB System function block CALL SFBn1,DBn2<br />
Note<br />
When you use the <strong>STL</strong> Editor, the references (n, n1, and n2) in the table above must<br />
refer to valid existing blocks. Likewise, symbolic names must be defined prior to use.<br />
Passing parameters (incremental edit mode)<br />
The calling block can exchange parameters with the called block via a variable list.<br />
The variable list is extended automatically in your <strong>STL</strong> program when you enter a<br />
valid CALL statement.<br />
If you call an FB, SFB, FC or SFC and the variable declaration table of the called<br />
block has IN, OUT, and IN_OUT declarations, these variables are added in the<br />
calling block as a formal parameter list.<br />
When FCs and SFCs are called, you must assign actual parameters from the calling<br />
logic block to the formal parameters.<br />
When you call FBs and SFBs, you must specify only the actual parameters that must<br />
be changed from the previous call. After the FB is processed, the actual parameters<br />
are stored in the instance DB. If the actual parameter is a data block, the complete,<br />
absolute address must be specified, for example DB1, DBW2.<br />
<strong>Statement</strong> <strong>List</strong> (<strong>STL</strong>) for S7-300 and S7-400 Programming<br />
A5E00706960-01 10-5