Siemens Simatic S7-300 Service Manual Page 157

  • Download
  • Add to my manuals
  • Print
  • Page
    / 272
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 156
Program Control Instructions
Statement List (STL) for S7-300 and S7-400 Programming
A5E00706960-01
10-13
10.9 Call SFC
Format
CALL SFC n
Note
If you are working in the STL Editor, the reference (n) must relate to existing valid
blocks. You must also define the symbolic names prior to use.
Description
This instruction is intended to call the standard functions (SFCs) supplied by
Siemens. The CALL instruction calls the SFC that you entered as address,
independent of the RLO or other conditions. 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 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, you must assign actual parameters in the calling
logic block to the formal parameters.
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
Example: Calling an SFC without parameters
STL Explanation
CALL SFC43 //Call SFC43 to re-trigger watchdog timer (no parameters).
Page view 156
1 ... 156 157 158 ... 272

Comments to this Manuals

No comments