In FBD, LD, and IL you can program for conditions by using EN/ENO functions or function blocks. EN stands for enable input, ENO for enable output.
There are no EN/ENO functions and function blocks in the ST editor. Use an IF or CASE statement instead to control the execution of the function or function block.All IEC functions and function blocks are available both with and without EN and ENO.
A Boolean input variable or the Boolean result of a logical expression can be connected to an EN input.
If the EN input is TRUE
The function or function block will be processed. After successful execution, the corresponding ENO output is set to TRUE. An EN input of the next function or function block connected to this ENO output will only be processed if it is TRUE.
If the EN input is FALSE
The function or function block will be not processed, the function result will not be changed and the connected variable keeps its value.
Programming language |
EN = FALSE Þ ENO = FALSE |
EN = TRUE Þ ENO = TRUE |
LD |
||
FBD |
||
IL |
User-defined functions and function blocks can be created with or without EN/ENO input and output. You can choose between the following possibilities:
select Use with EN/ENO when creating a new POU ( )
select Use with EN/ENO using ...
select [With EN/ENO] when inserting an instruction
Value of ENO output
If you do not explicitly set the ENO output within the body of the user-defined function or function block, it will have the same value as the EN input.
If you set the ENO output within the body of the user-defined function or function block to FALSE, the values of the output variables will not be transmitted to the outputs.
Set EN to TRUE prior to processing the POU. Once the POU has been successfully processed, the corresponding ENO is set to TRUE. If ENO is not set, an error might have occurred.