
50 2 Building Blocks of IEC 61131-3
EN
Explanation
a
ENO
EN = FALSE If EN is FALSE when calling the function, the
code-part of the function may not be executed. In
this case output ENO will be set to FALSE upon
exiting in order to indicate that the function has
not been executed.
ENO = FALSE
EN = TRUE If EN is TRUE when calling the function, the
code-part of the function can be executed nor-
mally. In this case ENO will initially be set to
TRUE before starting the execution.
ENO = TRUE
ENO can afterwards be set to TRUE or FALSE by
instructions executed within the function body.
ENO = individual
value
If a program or system error (as described in
Appendix E) occurs while executing the function
ENO will be reset to FALSE by the PLC.
ENO = FALSE
(error occurred)
a TRUE = logical “1”, FALSE = logical “0”
Table 2.6. Meaning of EN and ENO within functions
As can been seen from Table 2.6, EN and ENO determine the control flow in a
graphical network by means of conditional function execution and error handling
in case of abnormal termination. EN can be connected not only to a single contact
as in Example 2.16, but also with a sub-network of several contacts, thus setting a
complex precondition. ENO can be similarly be evaluated by a more complex sub-
network (e.g. contacts, coils and functions). These control flow operations should
however be logically distinguished from other LD/FBD operations that represent
the data flow of the PLC program.
These special inputs/outputs EN and ENO are not treated as normal function
inputs and outputs by IEC 61131-3, but are reserved only for the tasks described
above. At present IEC 61131-3 does not use or refer to EN/ENO in LD or FBD in
function blocks, but this will probably be changed in the near future
The use of these additional inputs and outputs is not included in the other
IEC 61131-3 programming languages. In FBD the representation of EN/ENO is
allowed as an additional feature.
The function call in Example 2.16 can be represented in IL if the programming
system supports EN/ENO as implicit system variables.
If a programming system supports the usage of EN and ENO, it is difficult to
convert POUs programmed with these into textual form. In order to make this
possible, EN/ENO would also have to be keywords in IL or ST and would need to
be automatically generated there, as they are in LD/FBD. Then a function called in
LD could be written in IL and could, for example, set the ENO flag in case of an
error. Otherwise only functions written in LD/FBD can be used in LD/FBD
programs. The standard, however, does not make any statement about how to use