Introduction
The Program Unit data editor offers the following features:
Declaration of variables associated to the Program Unit
Instance declaration of elementary and derived function blocks (EFBs/DFBs) used in the Program Unit
Management of the Program Unit parameters
The following functions are available in all tabs of the data editor:
, , with the following restrictions:
menu command is greyed in every tabs.
Right-click
on a variable is greyed in every tabsand menu commands are not greyed but are not working in tab.
Right-click
and right-click on a variable are greyed in , and tabs.
Expand/collapse structured data
Sorting according to Symbol, Type, etc.
Filter
Inserting, deleting and changing the position of columns
Drag and drop between the Program Unit data editor and the program editors
Undo the last change
Export/Import
Variables associated to a Program Unit can be:
Private: can only be R/W in the scope of this Program Unit.
Public: can be R/W out of the scope of this Program Unit.
Parameters (inputs, outputs, inputs/outputs): linked to Public variables (from an other Program Unit), or Global variables.
Tab

The
tab is used to manage:input, output and input/output parameters.
public variables
external variables
The following functions are available:
Assigning of an effective parameter (can be a Global variable or a Public variable from another Program Unit) to input, output and input/output parameters.
Assigning of an initial value
Defining a symbol for parameters and variables
Assigning data types
Displaying all properties of a variable in a separate properties dialog box
Entering a comment
Variables
The
tab is used for declaring variables used by the Program Unit:
The following functions are available:
Defining a symbol for variables
Assigning data types
Assigning variables to Program Unit parameters (
)Declaring the
of the variables.Own selection dialog box for data types
Assignment of an initial value
Entering a comment
Displaying all properties of a variable in a separate properties dialog box
Function Blocks
The
tab is used for the instance declaration of elements and derived function blocks (EFBs/DFBs).Tab
:
The following functions are available:
Displaying the function blocks used in the Program Unit
Defining symbol for the function blocks used in the Program Unit
Automatic enabling of the defined symbols in the Program Unit
Entering a comment for the function block
Displaying all parameters (inputs/outputs) of the function block
Assigning of initial values to the function block inputs/outputs
Program Unit Data Usage
Variables and instances created using the program data editor can be inserted (context dependent) in the programming editors using the
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.
CAUTION | |
---|---|
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:
