Interlocks in SFC
Interlocks can be used to control the execution of actions associated to a step. An interlock is a method which has been added to the connection between a step and its action(s). It always returns a boolean value which is evaluated when the step is active. The interlock code can be programmed in ST, FBD/LD and NOLD.
The connected action is only executed if the interlock returns the value TRUE.Otherwise, if the interlock is FALSE, the following applies:
- None of the connected actions is executed.
- Variables changed by actions with (timed) Set qualifiers (S, DS, SD, SL) or Reset qualifier are not reset.
- Pulse qualifiers are not triggered.
- The timer of timed actions is reset as soon as the interlock becomes FALSE.
- The INTERLOCK_FAULT output switches to TRUE indicating the active interlock.
- The STEP_STATES of the affected step indicates the interlock state.
One interlock is allowed per step.
In the SFC graph, an interlock is represented as triangle at the step border:
Proceed as follows to add and program an interlock:- In the COMPONENTS area ('Functions & Function Blocks' folder), right click the folder of the respective SFC function block and select 'Add Interlock' from the context menu. The interlock type is now inserted (into the 'Interlocks' subfolder).
You can rename the default name. - Right-click the step to which you want to add the interlock and select 'Edit Interlock' from the context menu.
Open the drop-down menu and select the interlock from the list. - Open the interlock worksheet either by selecting the context menu 'Go To Implementation' in the SFC graph or by double-clicking it in the COMPONENTS area and edit the code as usual.In the code, local variables can be declared and access is possible to the input variables, output and InOut variables of the SFC function block as well as to its methods. The return value of the interlock is always Boolean.
When printing an SFC chart, interlocks are visible at their steps. Interlock worksheets are automatically printed, too.
To remove an interlock from a step, right-click the respective step in the SFC code and select 'Remove Interlock' from the context menu. Now you can delete the interlock method from the COMPONENTS area or assign it to another step.
Note
Interlocks can only be deleted from the COMPONENTS area if they are not associated to any step. |