99BProgramming concepts
6.5 Programming language
S7-1200 Programmable controller
152
System Manual, 11/2011, A5E02486680-05
You can also drag blocks from the navigation tree to the SCL program editor, and complete
the parameter assignment.
6.5.4
EN and ENO for LAD, FBD and SCL
Determining "power flow" (EN and ENO) for an instruction
Certain instructions (such as the Math and the Move instructions) provide parameters for EN
and ENO. These parameters relate to power flow in LAD or FBD and determine whether the
instruction is executed during that scan. SCL also allows you to set the ENO parameter for a
code block.
●
EN (Enable In) is a Boolean input. Power flow (EN = 1) must be present at this input for
the box instruction to be executed. If the EN input of a LAD box is connected directly to
the left power rail, the instruction will always be executed.
●
ENO (Enable Out) is a Boolean output. If the box has power flow at the EN input and the
box executes its function without error, then the ENO output passes power flow
(ENO = 1) to the next element. If an error is detected in the execution of the box
instruction, then power flow is terminated (ENO = 0) at the box instruction that generated
the error.
Table 6- 3
Operands for EN and ENO
Program editor
Inputs/outputs
Operands
Data type
LAD
EN, ENO
Power flow
Bool
EN
I, I:P, Q, M, DB, Temp, Power Flow
Bool
FBD
ENO
Power Flow
Bool
EN
1
TRUE, FALSE
Bool
SCL
ENO
2
TRUE, FALSE
Bool
1
The use of EN is only available for FBs.
2.
The use of ENO with the SCL code block is optional. You must configure the SCL compiler to set ENO when the code
block finishes.
Configuring SCL to set ENO
For checking the operation of individual statements within the SCL code, use OK or NOT OK
(Page 185) with an IF-THEN or other conditional construction.
To configure the SCL compiler for setting ENO, follow these steps:
1. Select the "Settings" command from the "Options" menu.
2. Expand the "PLC programming" properties and select "SCL (Structured Control
Language)".
3. Select the "Set ENO automatically" option.