Sequential Function Chart in Online Mode

With the Sequential Function Chart editor in Online mode, the currently active steps will be displayed in blue. If you have set it under ‘Extras’ ‘Options’, then the time management is depicted next to the steps. Under the lower and upper bounds that you have set, a third time indicator will appear from which you can read how long the step has already been active.

../_images/f394263d43756e8e0a33139006eab46b

In the picture above the step depicted has already been active 8 seconds and 410 milliseconds. The step must, however, be active for at least 7 minutes before the step will be left.

With ‘Online’ ‘Toggle Breakpoint’ a breakpoint can be set on a step, or in an action at the locations allowed by the language in use. Processing then stops prior to execution of this step or before the location of the action in the program. Steps or program locations where a breakpoint is set are marked in light blue.

If several steps are active in a parallel branch, then the active step whose action will be processed next is displayed in red.

If IEC step has been used, then all active actions in Online mode will be displayed in blue.

With the command ‘Online’ ‘Step over’ it is stepped always to the next step which action is executed. If the current location is:

  • a step in the linear processing of a POU or a step in the rightmost parallel branch of a POU, execution returns from the SFC POU to the caller. If the POU is the main program, the next cycle begins.
  • a step in a parallel branch other than the rightmost, execution jumps to the active step in the next parallel branch.
  • the last breakpoint location within an action, execution jumps to the caller of the SFC.
  • the last breakpoint location within an IEC action, execution jumps to the caller of the SFC.
  • the last breakpoint position within an input action or output action, execution jumps to the next active step.

With ‘Online’ ‘Step in’ even actions can be stepped into. If an input, output or IEC action is to be jumped into, a breakpoint must be set there. Within the actions, all the debugging functionality of the corresponding editor is available to the user.

If you rest the mouse cursor for a short time on a variable in the declaration editor, the type, the address and the comment of the variable will be displayed in a tooltip.

../_images/4fe1e0e743756e210a33139006eab46b

Note

If you rename a step and perform an Online Change while this step is active, the program will be stopped in undefined status !

Processing order of elements in a sequence:

  • First, all Action Control Block flags in the IEC actions that are used in this sequence are reset (not, however, the flags of IEC actions that are called within actions).

  • All steps are tested in the order which they assume in the sequence (top to bottom and left to right) to determine whether the requirement for execution of the output action is provided, and this is executed if that is the case.

  • All steps are tested in the order which they assume in the sequence to determine whether the requirement for the input action is provided, and this is executed if that is the case.

  • For all steps , the following is done in the order which they assume in the sequence:

    - If applicable, the elapsed time is copied into the corresponding step variable.

    - If applicable, any timeout is tested and the SFC error flags are serviced as required.

    - For non-IEC steps, the corresponding action is now executed.

  • IEC actions that are used in the sequence are executed in alphabetical order. This is done in two passes through the list of actions. In the first pass, all the IEC actions that are deactivated in the current cycle are executed. In the second pass, all the IEC actions that are active in the current cycle are executed.

  • Transitions are evaluated: If the step in the current cycle was active and the following transition returns TRUE (and if applicable the minimum active time has already elapsed), then the following step is activated.

The following must be noted concerning implementation of actions:

It can come about that an action is carried out several times in one cycle because it is associated with multiple sequences. (For example, an SFC could have two IEC actions A and B, which are both implemented in SFC, and which both call IEC action C; then in IEC actions A and B can both be active in the same cycle and furthermore in both actions IEC action C can be active; then C would be called twice).

If the same IEC action is used simultaneously in different levels of an SFC, this could lead to undesired effects due to the processing sequence described above. For this reason, an error message is issued in this case. It can possibly arise during processing of projects created with older versions of IEC 61131-3 editor.

Note

In monitoring expressions (e.g. A AND B) in transitions, only the “Total value” of the transition is displayed.