Siemens Simatic S7-300 Service Manual Page 155

  • Download
  • Add to my manuals
  • Print
  • Page
    / 272
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 154
Program Control Instructions
Statement List (STL) for S7-300 and S7-400 Programming
A5E00706960-01
10-11
10.8 Call SFB
Format
CALL SFB n1, DB n2
Description
This instruction is intended to call the standard function blocks (SFBs) supplied by
Siemens. The CALL instruction calls the SFB that you entered as address,
independent of the RLO or other conditions. If you call a system function block with
CALL, you must provide it with an instance data block. After processing the called
block, processing continues with the program for the calling block. The address for
the logic block can be specified absolutely or symbolically.
Passing parameters (incremental edit mode)
The calling block can exchange parameters with the called block via the variable list.
The variable list is extended automatically in your Statement List program when you
enter a valid CALL instruction.
If you call a system function block and the variable declaration table of the called
block has IN, OUT, and IN_OUT declarations, these variables are added in the
program for the calling block as a list of formal parameters.
When calling the system function block, you only need to specify the actual
parameters that must be changed from the previous call because the actual
parameters are saved in the instance data block after the system function block is
processed. If the actual parameter is a data block, the complete, absolute address
must be specified, for example DB1, DBW2.
The IN parameters can be specified as constants or as absolute or symbolic
addresses. The OUT and IN_OUT parameters must be specified as absolute or
symbolic addresses. You must ensure that all addresses and constants are
compatible with the data types to be transferred.
CALL saves the return address (selector and relative address), the selectors of the
two open data blocks, and the MA bit in the B (block) stack. In addition, CALL
deactivates the MCR dependency, and then creates the local data area of the block
to be called.
Status word
BR CC 1 CC 0 OV OS OR STA RLO /FC
writes: - - - - 0 0 1 - 0
Page view 154
1 2 ... 150 151 152 153 154 155 156 157 158 159 160 ... 271 272

Comments to this Manuals

No comments