Siemens SIMATIC S5 Manual page 91

Hide thumbs Also See for SIMATIC S5:
Table of Contents

Advertisement

S5-115F Manual
Call
Like other blocks, function blocks are stored under a specific number in the program memory (e.g.
FB 47). The numbers 240 to 255 are reserved for integrated function blocks. You can program
function block calls in all blocks except data blocks.
The call consists of the following parts:
Call statement
- JU
FBx
unconditional call
- JC
FBx
call if RLO = 1
Parameter list (only when parameters are assigned)
Function blocks can be called only if they have been programmed. When a function block call is
being programmed, the PLC requests function block data automatically.
Assigning parameters
The program in the function block specifies how the formal operands are to be processed.
The block in which the FB is called must specify the operand with which the FB is to work
(parameter list). This specification is written after the jump statement. The valid operands are also
called actual operands.
Parameter list:
After the call statement, the input and output variables and the data are defined, assigning each
formal operand an actual operand. The length of the parameter list is based on the number of
formal operands. You can therefore program up to 40 actual operands in the parameter list.
When the function block is processed, the actual operands from the parameter list are used in
place of the formal operands. The PLC monitors the sequence of the variables.
Figure 2-7 illustrates function block programming.
Other features:
The function block call takes up two words in the program memory. Each parameter takes up an
additional memory word.
Catalog ST 57 gives the run time and the required memory length of standard function blocks.
The designators (DES) that appear on the programmer for the function block inputs and outputs
during programming are stored in the function block itself, along with the name. You must
therefore transfer all necessary function blocks to the program diskette (for off-line pro-
gramming) or directly into the program memory of the programmable controller before
programming on the programmer.
EWA 4NEB 811 6149-02
Introduction to STEP 5
2-17

Advertisement

Table of Contents
loading

This manual is also suitable for:

S5-115f

Table of Contents