Siemens S5-100U User Manual page 135

Simatic s5 programmable controller
Hide thumbs Also See for S5-100U:
Table of Contents

Advertisement

S5-100U
A function block 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
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:
Specify in the parameter list of the 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:
When the FB is called, it replaces the formal operand "IN1" with the actual operand
"I 1.0".
Figure 7-6 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 in Catalog ST 57.
The name of the function block is stored in the function block. The designations (DES) of the
function block inputs and outputs that appear on the programmer during programming are also
stored in the function block. Before you begin programming on the programmer, you must choose
one of the following two options:
Transfer all necessary function blocks to the program diskette (for off-line programming)
Input all necessary function blocks directly into the program memory of the programmable
controller
EWA 4NEB 812 6120-02
IN1
I BI
I 1.0
Introduction to STEP 5
7-15

Advertisement

Table of Contents
loading

Table of Contents