Statement List (STL) - DCE FEL ČVUT v Praze
Statement List (STL) - DCE FEL ČVUT v Praze
Statement List (STL) - DCE FEL ČVUT v Praze
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
10.8 Call SFB<br />
Format<br />
Description<br />
CALL SFB n1, DB n2<br />
Program Control Instructions<br />
This instruction is intended to call the standard function blocks (SFBs) supplied by<br />
Siemens. The CALL instruction calls the SFB that you entered as address,<br />
independent of the RLO or other conditions. If you call a system function block with<br />
CALL, you must provide it with an instance data block. After processing the called<br />
block, processing continues with the program for the calling block. The address for<br />
the logic block can be specified absolutely or symbolically.<br />
Passing parameters (incremental edit mode)<br />
Status word<br />
The calling block can exchange parameters with the called block via the variable list.<br />
The variable list is extended automatically in your <strong>Statement</strong> <strong>List</strong> program when you<br />
enter a valid CALL instruction.<br />
If you call a system function block and the variable declaration table of the called<br />
block has IN, OUT, and IN_OUT declarations, these variables are added in the<br />
program for the calling block as a list of formal parameters.<br />
When calling the system function block, you only need to specify the actual<br />
parameters that must be changed from the previous call because the actual<br />
parameters are saved in the instance data block after the system function block is<br />
processed. If the actual parameter is a data block, the complete, absolute address<br />
must be specified, for example DB1, DBW2.<br />
The IN parameters can be specified as constants or as absolute or symbolic<br />
addresses. The OUT and IN_OUT parameters must be specified as absolute or<br />
symbolic addresses. You must ensure that all addresses and constants are<br />
compatible with the data types to be transferred.<br />
CALL saves the return address (selector and relative address), the selectors of the<br />
two open data blocks, and the MA bit in the B (block) stack. In addition, CALL<br />
deactivates the MCR dependency, and then creates the local data area of the block<br />
to be called.<br />
BR CC 1 CC 0 OV OS OR STA RLO /FC<br />
writes: - - - - 0 0 1 - 0<br />
<strong>Statement</strong> <strong>List</strong> (<strong>STL</strong>) for S7-300 and S7-400 Programming<br />
A5E00706960-01 10-11