Introduction

The data editor offers the following features:

  • Declaration of variable instances

  • Definition of derived data types (DDTs)

  • Definition of Device derived data types (Device DDTs)

  • Instance declaration of elements and derived function blocks (EFBs/DFBs)

  • Definition of derived function block (DFBs) parameters

The following functions are available in all tabs of the data editor:

  • Copy, Cut, Paste with the following restrictions:

    • Edit > Cut menu command is greyed in every tabs.

    • Right-click Cut on a variable is greyed in every tabs

    • Edit > Copy and Edit > Paste menu commands are not greyed but are not working in DDT Types and DFB Types tabs.

    • Right-click Copy and right-click Paste on a variable are greyed in DDT Types, Function Blocks, and DFB Types tabs.

  • Expand/collapse structured data

  • Sorting according to Type, Symbol, Address etc.

  • Filter

  • Inserting, deleting and changing the position of columns

  • Drag and Drop between the data editor and the program editors

  • Undo the last change

  • Export/Import

Variables

The Variables tab is used for declaring variables.

Variables tab:

The following functions are available:

  • Defining a symbol for variables

  • Assigning data types

  • Own selection dialog box for derived data types

  • Assignment of an address

  • Automatic symbolization of I/O variables

  • Assignment of an initial value

  • Entering a comment

  • View all properties of a variable in a separate properties dialog box

Hardware Dependent Data Types (IODDT)

IODDTs are used to assign the complete I/O structure of a module to an individual variable.

Assignment of IODDTs:

The following functions are available:

  • Complete I/O structures can be assigned with individual variables using IO DDTs

  • After entering the variables addresses, all elements of the structure are automatically assigned with the correct input/output bit or word

  • Because it is possible to assign addresses later on, standard modules can be simply created whose names are defined at a later date.

  • An alias name can be given to all elements of an IODDT structure.

Hardware Dependent Device Derived Data Types (Device DDT)

Device derived data type (DDT) is a predefined DDT that describes the I/O language elements of an I/O Module. This data type is represented in a structure, which depends on the capabilities of the I/O module.

This structure provides bits and register views when both extracted bits and register exist in IODDT. In this case extracted bit is not seen as a child element of the register variable but directly as field of Device DDT structure.

When adding a Modicon M340 module in a M340 remote I/O drop the Control Expert software will create automatically the associated Device DDT instance. This instance is deduced from IODDT (other not mapped object like %KW are not accessible).

Each I/O Module is associated with one implicit device DDT instance:

  • Implicit Device DDT instances are created by default on device insertion and refreshed automatically by the PLC. They contain the modules status, modules and channels health bits, values of the modules inputs, values of the modules outputs, etc.

The Implicit Device DDT can be:

  • linked to a device (Managed)

  • not linked to a device (Un-managed)

NOTE: IODDT and topologic address are no longer supported with the Modicon M340 remote I/O modules. All the informations (bits and registers) related to a channel are accessible directly as a field of device DDT structure.
NOTE: Optional Explicit structures are DDT Explicit DDT, created on demand from data editor and used through Function block to be refreshed.
NOTE: Optional Explicit DDT types are proposed in the data editor to support Status or Command data used by explicit exchanges on a Channel of an IO Modules in a M340 remote I/O drop. Explicit DDT instances are created manually by the user in the data editor and used as Input or Output Parameter with the Function block managing the explicit exchange (READ_STS_QX, WRITE_CMD_QX).

Derived Data Types (DDT)

The DDT types tab is used for defining derived data types (DDTs).

A derived data type is the definition of a structure or array from any data type already defined (elementary or derived).

Tab DDT types:

The following functions are available:

  • Definition of nested DDTs (max. 15 levels)

  • Definition of arrays with up to 6 dimensions

  • Assignment of an initial value

  • Assignment of an address

  • Entering a comment

  • Analysis of derived data types

  • Assignment of derived data types to a library

  • View all properties of a derived data type in a separate properties dialog box

  • An alias name can be given to all elements of a DDT structure or an array.

Function Blocks

The Function blocks tab is used for the instance declaration of elements and derived function blocks (EFBs/DFBs).

Tab Function blocks :

The following functions are available:

  • Display of the function blocks used in the project

  • Definition of a symbol for the function blocks used in the project

  • Automatic enabling of the defined symbols in the project

  • Enter a comment about the function block

  • View all parameters (inputs/outputs) of the function block

  • Assignment of an initial value to the function block inputs/outputs

DFB Types

The DFB types tab is used for the defining derived function block (DFBs) parameters.

The creation of DFB logic is carried out directly in one or more sections of the FBD, LD, IL or ST programming languages.

Tab DFB types:

The following functions are available:

  • Definition of the DFB name

  • Definition of all parameter of the DFB, such as:

    • Inputs

    • Outputs

    • VAR_IN_OUT (combined inputs/outputs)

    • Private variables

    • Public variables

  • Assignment of data types to DFB parameters

  • Own selection dialog box for derived data types

  • Assignment of an initial value

  • Nesting DFBs

  • Use of several sections in a DFB

  • Enter a comment for DFBs and DFB parameters

  • Analyze the defined DFBs

  • Version management

  • Assignment of defined DFBs to a library

Data Usage

Data types and instances created using the data editor can be inserted (context dependent) in the programming editors.

The following functions are available:

  • Access to all programming language editors

  • Only compatible data is displayed

  • View of the data according to their scope affiliation

  • View of the functions, function blocks, procedures and derived data types arranged according to their library affiliation

  • Instance declaration during programming is possible

Data selection dialog box:

Online Modifications

It is possible to modify the type of a variable or a Function Block (FB) instance declared in application or in a Derived Function Block (DFB) directly in online mode. That means it is not required to stop the application to perform such a type modification.

These operations can be done either in the data editor or in the properties editor, in the same way as in offline mode.

When changing the type of a variable, the new value of the variable to be modified depends on its kind:

  • In the case of an unlocated variable, the variable is set to the initial value, if one exists. Otherwise, it is set to the default value.

  • In the case of a located variable, the variable restarts with the initial value if one exists. Otherwise, the current binary value is unchanged.

NOTE: It is not possible to modify the type of a variable declared in Derived Data Type (DDT) in online mode. The application has to be switched into offline mode in order to build such a modification.

Restrictions About Online Modifications

In the following cases, the online type modification of a variable or of a Function Block (FB) is not allowed:

  • If the variable is used as network global data, the online type modification is not permitted.

  • Whether the current FB can not be removed online, or a new FB can not be added online, the online type modification of this FB is not allowed. Indeed, some Elementary Function Blocks (EFB) like the Standard Function Blocks (SFB) do not allow to be added or removed online. As a result, changing the type of an EFB instance to a SFB instance is not possible, and conversely.

In both of these cases, the following dialog box is displayed:

NOTE: Due to these limitations, if a Derived Function Block (DFB) contains at least one instance of a SFB, it is not be possible to add or remove instance of this DFB in online mode.