Execution Control: EN/ENO
This help chapter contains the following information:General Information on Execution Control with EN/ENO
EN/ENO allows an optional conditional execution of functions and function blocks according to the IEC 61131-3 standard. EN is an enable input, ENO an enable output formal parameter. Their functionality is described below.
To insert POUs with EN/ENO parameters into worksheets by default, the appropriate checkboxes must be activated in the 'Options' dialog under the 'EN/ENO' category (see section below).
Note
This setting only affects the insertion of POUs with or without EN/ENO parameters. Regardless of this setting, the conditional execution is always considered during runtime if EN/ENO formal parameters are used in the code. |
POUs with and without EN/ENO can run at the same time in one worksheet/project.
EN/ENO is available...- for function POUs (IEC 61131-3 standard FUs and firmware FUs).
- as well as for user-defined functions and FBs if implemented accordingly.
- in the programing languages FBD and ST.
In the current PLCnext Engineer version, EN/ENO is not available for firmware function blocks which are included by default with the programming system (including safety-related PLCopen function blocks). For these blocks, the correct block execution can be monitored by evaluating the corresponding status/error output(s). Furthermore, methods (of object-oriented FBs) do not support EN/ENO.
Behavior of EN/ENO
The POUs listed above provide an EN input and an ENO output. These formal parameters are used to control the execution of the POU. If the insertion of POUs with EN/ENO feature is activated, a newly inserted POU (which supports the EN/ENO feature) provides the EN/ENO formal parameters by default.
Formal parameter | Meaning | |
---|---|---|
EN | Boolean input formal parameter that enables the execution of the POU:
|
|
ENO | Boolean output formal parameter which indicates whether the POU is executed correctly.ENO may remain unconnected.Most of the standard FUs/FBs react as follows. Also observe the note below.
|
Example in FBD: conditional execution of two subsequent functions
In ST code, the EN input and the ENO output are already included as placeholders when inserting a function from the COMPONENTS area via drag & drop (if activated). In the call statement, these parameters can directly be assigned to variables.