Siemens SIMATIC S5-90U System Manual page 160

Table of Contents

Advertisement

Introduction to STEP 5
The call consists of the following parts.
Call statement
unconditional call ( J ump U nconditional)
- JU
FBx
- JC
FBx
call if RLO = 1 ( J ump C onditional)
Parameter list (only if block parameters were defined in the FB)
Function blocks can be called only if they have been programmed. When a function block call is
being programmed, the programmer requests the parameter list for the FB automatically if block
parameters have been defined in the FB.
Setting Parameters for a Function Block
The program in the function block specifies how the formal operands (parameters defined as "DES")
are to be processed.
As soon as you have programmed a call statement (for example JU FB2), the programmer displays
the parameter list . The parameter list consists of the names of the parameters. Each parameter
name is followed by a colon (:).You must assign actual operands to the parameters.The actual
operands replace the formal operands defined in the FB when the FB is called, so that the FB "in
reality"operates with the actual operands.
A parameter list has a maximum of 40 parameters.
Example:
The name (DES) of a parameter is IN1, the parameter type is I (as in input), the data type is BI (as
in bit). The formal operand for the FB has the following structure.
DES:
IN1
I
BI.
Specify in the parameter list of calling block which actual operand is to replace the formal operand in
the FB call. In our example it is : I 1.0.
Enter in the parameter list:
IN1:
I 1.0.
When the FB is called, it replaces the formal operand "IN1" with the actual operand "I 1.0".
Figure 7-5 provides you with a detailed example of how to set parameters for a function block.
The FB call takes up two words in the internal program memory. Each parameter takes up an
additional memory word.
You can find the memory requirements for standard function blocks and the run times in the
specifications of Catalog ST 57.
The designations (DES) of the function block inputs and outputs appearing during programming on
the programmer, as well as the name of the function block, are stored in the function block itself.
Therefore, you must transfer all necessary function blocks to the program diskette (for off-line
programming) or directly into the program memory of the programmable controller before pro-
gramming on the programmer.
7-14
S5-90U/S5-95U
EWA 4NEB 812 6115-02b

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s5-95u

Table of Contents