
Drive PLC Developer Studio
Introduction
2-4
l
DDS EN 2.3
2.2.4 Function block
A function block is a software organization unit whose execution returns one or several values.
• Unlike a function, a function block does not supply a return value.
• A function block declaration starts with the keyword FUNCTION_BLOCK.
• The creation of instances (data records) of a function block is a prerequisite.
2.2.4.1 Function block instances
• Every instance has its own identifier (instance name) and a data structure which includes its
inputs, outputs and internal variables.
• Instances are locally or globally declared like variables by giving the function block name as
identifier type.
Example of an instance named INSTANZ of function block FUB:
INSTANZ: FUB;
• The instances described above are always used to call function blocks.
• Only input and output parameters can be accessed from outside an instance of a function
block, not its internal variables.
Example with the help of a data model:
Instances L_ABS1 ... L_ABSn are instances of the function block type L_ABS. Instance as many
instances as required.
Comentarios a estos manuales