DFB function blocks
234
35015365.01 07/2008
Using a DFB in a program in instruction list or text language
General points Calling up the DFB function block constitutes an action which can be put in a
sequence just like any other action in the language.
General syntax The DFB programming syntax is as follows:
The following table describes the role of the instruction parameters.
Text syntax Instructions in text language have the following syntax:
Name_DFB (E1,...,En,ES1,...,ESn,S1,...,Sn);
Example: Cpt_bolts(%I2.0,%MD10,%I2.1,%Q1.0);
Instruction list
syntax
Instructions in instruction list language have the following syntax:
[Name_DFB (E1,...,En,ES1,...,ESn,S1,...,Sn)]
Example:
LD TRUE
[Cpt_bolts(%I2.0,%MD10,%I2.1,%Q1.0)]
Parameters Role
E1, ..., En Expressions (except for BOOL/EBOOL type objects), objects or immediate
values using effective parameters for input parameters.
ES1, ..., ESn Effective parameters corresponding to inputs/outputs. They are always
read/write language objects.
S1, ..., Sn Effective parameters corresponding to outputs. They are always read/write
language objects.
DFB_Name
(E1,...,En,ES1,...,ESn,S1,...,Sn);