-

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:

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:
  1. 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.
  2. 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.
  3. 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.