Type Definition

The type of an EFB or DFB function block is defined by:

  • the type name, defined by the user for the DFBs,

  • an optional comment. The authorized characters correspond to the ASCII codes 32 to 255,

  • the application interface data:

    • the inputs, not accessible in read\write mode from the application, but read by the function block code,

    • the inputs\outputs, not accessible in read\write mode from the application, but read and written by the function block code,

    • the outputs, accessible in read only from the application and read and written by the function block code.

  • the internal data:

    • public internal data, accessible in read\write mode from the application, and read and written by the function block code,

    • private internal data, not accessible from the application, but read and written by the function block code.

  • the code:

    • for DFBs, this is written by the user in PLC language (Structured Text, Instruction List, Ladder language, function block language), and is structured in a single section or in several sections,

    • for EFBs, this is written in C language.

  • information such as:

    • type version number,

    • date of the last modification of the code, or of the internal variables, or of the interface variables.

    • an optional descriptive file (32767 characters), describing the block function and its different modifications.

Characteristics

This table gives the characteristics of the elements that make up a type:

Element

EFB

DFB

Name

32 characters

32 characters

Comment

1024 characters

1024 characters

Input Data

32 maximum

32 maximum

Input/Output data

32 maximum

32 maximum

Output data

32 maximum

32 maximum

Number of interfaces

(Inputs+Outputs+Inputs/Outputs)

32 maximum (2)

32 maximum (2)

Public data

No limits (1)

No limits (1)

Private data

No limits (1)

No limits (1)

Programming language

C language

Language:

  • Structured Text,

  • Instruction List,

  • Ladder language,

  • function block.

Section

 

A section is defined by:

  • a name (maximum 32 characters),

  • a validation condition,

  • a comment (maximum 256 characters),

  • a protection:

    • without,

    • read only,

    • read\write mode.

A section cannot access declared variables in the application, except for:

  • system double words %SDi,

  • system words %SWi,

  • system bits %Si.

(1): the only limit is the size of the PLC's memory.

(2): the EN input and ENO output are not taken into account.