Implementation Procedure
There are 3 steps in the DFB function block implementation procedure:
Step |
Action |
---|---|
1 |
Create your DFB model (called: DFB type). |
2 |
Create a copy of this function block, called an instance, every time the DFB is used in the application. |
3 |
Use the DFB instances in your application program. |
Creation of the DFB Type
This operation consists in designing a model of the DFB you want to use in your application. To do this, use the DFB editor to define and code all the elements that make up the DFB:
Description of the function block: name, type (DFB), activation of diagnostics, comment.
Structure of the function block: parameters, variables, code sections.
Description of a DFB Type
The following diagram shows a graphic representation of a DFB model.

The function block comprises the following elements:
Name: name of the DFB type (max. 32 characters). This name must be unique in the libraries, the authorized characters used depend on the choice made in the Identifiers area of the Language extensions tab in the Project Settings:
Inputs: input parameters (excluding input/output parameters).
Outputs: output parameters (excluding input/output parameters).
Inputs/Outputs: input/output parameters.
Public variables: internal variables accessible by the application program.
Private variables: nested internal variables or DFBs, not accessible by the application program.
Sections: DFB code sections in LD, IL, ST or FBD.
Comment of a maximum of 1024 characters. Formatting characters (carriage return, tab, etc.) are not authorized.
For each type of DFB, a descriptive file is also accessible via a dialog box: size of the DFB, number of parameters and variables, version number, date of last modification, protection level, etc.
Online Help for DFB Types
It is possible to link an HTML help file to each DFB in the User-Defined Library. This file must:
Have a name that is identical to the linked DFB,
Be located in the directory \Schneider Electric\FFBLibset\CustomLib\MyCustomFam\Language (where Language is named Eng, Fre, Ger, Ita, Spa or Chs according to the language desired).
Creation of a DFB Instance
Once the DFB type is created, you can define an instance of this DFB via the variable editor or when the function is called in the program editor.
Use of DFB Instances
A DFB instance is used as follows
as a standard function block in Ladder (LD) or Functional Block Diagram (FBD) language,
as an elementary function in Structured Text (ST) or Instruction List (IL) language.
A DFB instance can be used in all application program tasks, except event tasks and Sequential Function Chart (SFC) transitions.
Storage
The DFB types the user creates can be stored in the function and function block library.