DFB function blocks
35015365.01 07/2008 227
Coding rules for DFB types
General points The code defines the processing the DFB block must carry out depending on the
parameters declared.
The DFB function block code is programmed in text or ladder language.
As far as text language is concerned, the DFB is made up of a single text sequence
of unlimited length.
Programming
rules
All language instructions and advanced functions are permitted except for:
z calling up standard function blocks,
z calling up other DFB function blocks,
z connecting to a JUMP label,
z calling up a sub-program,
z theHALT instruction,
z instructions using input/output module variables (e.g.: READ_STS, SMOVE...).
The code uses DFB parameters and variables defined by the user.
The DFB block function code cannot use either input/output objects (%I,%Q...), or
global application objects (%MW,%KW...) except for the system bits and words %S
and %SW.
Specific
functions
The table below describes functions that have been specifically adapted to be used
in the code.
Note: it is not possible to use a label
Functions Role
FTON, FTOF, FTP, FPULSOR These timing functions are meant to be used instead of
standard timing function blocks.
LW, HW, COCATW These instructions are used to manipulate words and
double words.
LENGTH_ARW, LENGTH_ARD,
LENGTH_ARR
These instructions are used to calculate the length of
tables.