Introduction
The EN
input connected).
The default value of this project setting for new applications is deactivated (unchecked).
WARNING | |
---|---|
Changing this Project Setting
You can change the Control Expert under .
project setting inBehavior in Case of Deactivated Project Setting
In case of a falling edge of EN
input, the values of output variables stay unchanged, whereas output
links are reset to 0.
For the example shown in the graphic below:
EN
-> 0save_out_val = 1
link = 0 (red)

Behavior in Case of Activated Project Setting
In case of a falling edge of EN
input, the values of output variables and output links stay unchanged.
For the example shown in the graphic below:
EN
-> 0save_out_val = 1
link = 1 (green)

Compatibility Unity Pro 4.0 and 4.1 or later
Unity Pro is the former name of Control Expert for version 13.1 or earlier.
The following table describes the compatibility of Unity Pro 4.0 (or earlier) and Unity Pro 4.1 or later regarding:
transferring from PLC to PC (upload)
opening XEF file on PC (import)
opening STA file on PC (archived project)
The compatibility depends on whether the project setting
is activated or deactivated.Prerequisite |
Unity Pro ≤4.0 |
Unity Pro 4.1 or later |
---|---|---|
Generated with Unity Pro ≤4.0. Project setting not available in Unity Pro 4.0. |
possible |
possible |
Generated with Unity Pro 4.1 or later for an application 4.0. Project setting deactivated. |
possible (1) |
possible |
Generated with Unity Pro V4.1 or later for an application V4.0 Project setting activated. |
not possible |
possible |
Generated with Unity Pro V4.1 or later for an application V4.1 or later, using M340 V2.1 PLC, …) Project setting deactivated. |
not possible |
possible |
Generated with Unity Pro V4.1 or later for an application V4.1 or later (using M340 V2.1 PLC, …) Project setting activated. |
not possible(2) |
possible |
(1) importing a 4.1 XEF file into Unity 4.0 may require the external tool XEFDowngrader (2) PLC is not recognized |
Project Settings after Upload, Open XEF, Open STA File
Unity Pro is the former name of Control Expert for version 13.1 or earlier.
The following table describes the status of the
project setting aftertransferring from PLC to PC (upload)
opening XEF (or ZEF) file on PC (import)
opening STA file on PC (archived project)
Prerequisite |
Unity Pro ≤4.0 |
Unity Pro 4.1 or later |
---|---|---|
Generated with Unity Pro ≤4.0. Project setting not available in Unity Pro 4.0. |
not available |
not activated |
Generated with Unity Pro 4.1 or later for an application 4.0. Project setting deactivated. |
not available |
not activated |
Generated with Unity Pro V4.1 or later for an application V4.0 Project setting activated. |
not available |
activated |
Generated with Unity Pro V4.1 or later for an application V4.1 or later, using M340 V2.1 PLC, …) Project setting deactivated. |
not available |
not activated |
Generated with Unity Pro V4.1 or later for an application V4.1 or later (using M340 V2.1 PLC, …) Project setting activated. |
not available |
activated |
In case of uploading, importing or opening a Unity Pro application with Unity Pro 4.1 or later, created with Unity Pro 4.0 or earlier, the
project setting is deactivated.After a
and download the behavior is the same as the application had in the environment of the earlier version of Unity Pro.If you want to use the
project setting, you must:open or upload an application,
activate the project setting,
.
Undoing EF Deletion
If the
project setting is activated and an EF is called conditionally, static memory will be allocated for each output pin of the EF, to save the output values during runtime.In case you delete this EF in the editor the static memory will be released.
If you perform an UNDO later on, the EF will be re-created and new static memory will be allocated.
After a following
, these mechanisms occur:project setting deactivated:
No static memory is assigned for the output pins as maintaining the last link values is not needed.
If EN is 0 the link is reset to 0.
If EN is 1 the link is written with the value of the OUT.
project setting activated:
New static memory is allocated for the output pins because the old memory has been released. The link´s new static memory is initialized to 0.
If EN is 0 the link's value remains initialized to 0.
If EN is 1 the EF is executed and the value of the OUT is written to the link.
Example:
Project setting activated, EN not connected

Conditions before
:EN = 0
save_out_val = 1
link = 1
Delete EF.

Perform UNDO and
.
Result:
save_out_val = 1
link = 0
With the next activation of the changed EF the link's new static memory will be written and works as expected on the next deactivation.
This behavior is in principle the same by using other EF types (ADD, XOR…).
EN Not Connected
If EN is not connected or not displayed (box
not checked), no preparation is done to maintain the last link values.If the EN input is connected later and then
is performed, the following mechanisms occur:project setting deactivated:
No static memory is assigned as maintaining the last link values is not needed.
After falling edge of EN, link is reset to zero, variable save_out_val is unchanged.
project setting activated:
New static memory is allocated in PLC to maintain the last link values for the output links. This static memory is initialized to 0.
If EN is 1 after a
, the EF is executed and the output data is assigned to the connected link's static memory.The link's static memory will be consistent at the end of the first PLC working cycle after a
.
Example:
Option activated, EN not connected

Conditions before
:EN of first AND is not connected, i.e. EF AND is invoked
save_out_val = 1
link = 1
Connect enable to EN of first AND, set enable to 0, perform
.
Result:
save_out_val = 1
link = 0
With the next activation of the changed EF the link's new static memory will be written and works as expected on the next deactivation.
This behavior is in principle the same by using other EF types (ADD, XOR…).
Use Cases
The following use cases show that
replacing EFs by other EFs leads to initialization of output link values due to new memory allocation.
changing output links on not changed EFs leads to maintaining the link values due to using of already allocated memory that belongs to the EFs.
The following use cases apply to all EF types.
Replacing AND by AND_BOOL
Preconditions
project setting is activated
variable enable = 0.
output link = 1 (due to enable was 1 in the history)

Replace AND by AND_BOOL and perform
.
Result: output link = 0
Reason for output link is 0 after Build Changes:
The memory to hold the output values of the deleted EF (AND) has been released.
Assigning a new EF (AND_BOOL) causes allocation of new memory to hold its output link values.
The new memory is initialized to 0.
Replacing ADD by MUL
Preconditions
project setting is activated
variable enable = 0.
output link = 6 (due to enable was 1 in the history)

Replace ADD_INT by MUL_INT and perform
.
Result: output link = 0
Reason for output link is 0 after Build Changes:
The memory to hold the output values of the deleted EF (ADD_INT) has been released.
Assigning a new EF (MUL_INT) causes allocation of new memory to hold its output link values.
The new memory is initialized to 0.
Deleting Output Link and Performing UNDO
Preconditions
project setting is activated
variable enable = 0.
output link = 6 (due to enable was 1 in the history)

Delete output link.
Undo deletion and perform
.
Result: output link = 6
Reason for output link is 6 after Build Changes:
Deleting an output link and connecting a new output link to the same EF output pin does not cause the allocating of new memory to hold the values of the output link.
As this memory belongs to the EF, it will not be released until deletion of the EF.
In this use case the new link gets the memory of the deleted link (value = 6).