Function Blocks (Fbs) - Siemens SIMATIC S5 Manual

Hide thumbs Also See for SIMATIC S5:
Table of Contents

Advertisement

Introduction to STEP 5
2.3.4

Function Blocks (FBs)

Frequently recurring or complex control functions are programmed in function blocks.
Function blocks have the following special features:
FBs can be assigned parameters.
Actual parameters can be assigned when the block is called.
FBs have a supplementary set of operations not available to other blocks.
The FB program can be written and documented in STL only.
The S5-115F has the following types of function blocks:
FBs that you can program
FBs that are integrated in the operating system
FBs that are available as software packages (Standard Function Blocks, Catalog ST 57)
The program counter (LPLZ) sequence is the first operation for all FBs ( 3.8):
LFW0
LKF+ 1
+ F
TFW0
Memory requirement
In addition to the block header, function blocks have more organization information than other
blocks.
Memory requirements are as follows:
Block header (5 words)
Block name (5 words) including jump operation (1W)
Block parameters for initialization (3 words per parameter; 40 parameters max.)
Block code (max. 127 W)
BE operation (1 W)
Creating a function block
In contrast to other blocks, the following additional information can be stored in a function block:
Library number
The block can be assigned a number from 0 to 65535. This number is not dependent on
symbolic or absolute parameters of the FB.
A library number should be prescribed only once to identify a particular function block clearly.
Standard function blocks have their own product number.
Name
A function block can be "labelled" with a name of up to eight characters.
To assign parameters, you must program the following block parameter information:
Block parameter name (formal operand)
Each block parameter as formal operand is given a designation (DECL). Under this designation
it is replaced by an actual operand when the function block is called.
The name can be up to four characters long and must begin with a letter of the alphabet. You
can program up to 40 parameters per function block.
2-14
S5-115F Manual
EWA 4NEB 811 6149-02

Advertisement

Table of Contents
loading

This manual is also suitable for:

S5-115f

Table of Contents