At a Glance
In SFC language you have 2 debugging levels:
from an SFC section (chart),
from a section implementing an action or a transition, where this section is written in one of the following languages (Ladder, Structured Text, Function Block Diagram, Instruction List).
Sections Implementing Actions or Transitions
In this type of section, debugging behaves in practically the same way as debugging for a conventional section using one of the following languages:
The specific characteristics of this type of debug are:
it is impossible to enter a section of an action or a transition in step by step mode when coming from another section, unless this section contains a breakpoint,
when you are at the end of a section of an action or a transition it is impossible to exit it in step by step mode by using the commands Step Into, Step Over, Step Out, Go is the only command available.
SFC Sections (Chart)
Step by step mode consists in executing the application program step by step.
This mode is launched by a breakpoint which will have been set in advance (on a step). It is used to examine the behavior of the code, and the value of the variables.
It is implemented in online mode. The section executed in step by step mode in contrast to sections in languages other than SFC does not stop the task, but freezes the chart.
The debugging of an SFC section (chart) is checked using the Animation Panel (Services->Animation Panel). Each SFC section (chart) has its own tool.
WARNING | |
---|---|
Animation Panel Tool
To launch the tool, carry out the following actions:
Step |
Action |
---|---|
1 |
Open the editor for the SFC section (chart) that you wish to debug. |
2 |
Select the following command from the menu: Services->Animation Panel->Show Animation Panel Result: The tool is displayed. |
Animation Panel tool:

Description of different commands:
SFC section name |
|
---|---|
Parameters zone |
|
Initialize Chart |
For an SFC section which is currently being executed, do the following in order: 1) check this box to deactivate the active step(s), 2) uncheck this box to activate the initial steps to start the section. |
Disable Time Check |
Check this box to disable checking of step execution times. |
Disable Transitions |
Check this box to make it possible to freeze the chart in any transition state. This box must be checked to be able to use the following buttons: Step Trans Dependent, Step Over and Step Out |
Disable Actions |
Check this box to stop processing of steps. |
Operation zone |
|
Clear Chart |
Deactivates the active step(s). |
Reset Time Errors |
Resets information on step activity time overruns. |
Step Unconditional |
Move onto the next step without acknowledgment of the transition condition. Doesn't work if you have a Delay Time (SFCSTEP_TIME.delay) set in the properties of the STEP. |
Step Trans Dependent |
Moves to the successor step if the transition condition and the step delay time (SFCSTEP_TIME.delay) are fulfilled. If the transition condition is not right, the chart is unfreezed and waits for the right transition's condition. With the activation of the successor step the chart returns to the freeze state. |
Step Over |
This command moves to the successor step if the transition condition and the step delay time (SFCSTEP_TIME.delay) are fulfilled. If the transition condition is not right, the chart is unfreezed and waits for the right transition's condition in order to move onto the next step or steps (in the event of divergence). With the activation of the successor step the chart returns to the freeze state. |
Step Out |
Only available if the current element is a step belonging to a macro-step section. This command unfreezes the chart (master and macro belong logically to the same chart) in order to work normally over the end of the macro. The process waits for the valid transition condition(s) of the chart in order to move onto the successor step or steps (in the event of divergence). With the activation of the (first) successor step the chart returns to the freeze state. |
Set Break On Selection |
Sets a breakpoint for all selected steps. |
Set Pre Pos On Selection |
Sets the pre-positioning markers on the steps and macro-steps of the SFC section. |
Set Pre-positioned |
Activates all the steps and macro-steps pre-positioned with the Set Pre Pos On Selection command. |
Select active steps |
Selects the active steps. |
Set Selected Steps |
Activates the selected steps and macro-steps. |
Reset Selected Steps |
Deactivates the selected steps and macro-steps. For Multi-Token operating mode only ( ). |
Clear All Breakpoints |
Deactivates all the breakpoints. |
Clear All Pre-Positions |
Deactivates all the steps and macro-steps pre-positioned. |
SFC save and restore
The SFC_RESTORE
function block can be used to restart
all SFC charts of an application with a given set of active steps
at a state, saved before a CPU failure.
In a recovery situation it is possible to set a group of steps that represent a given state in the process and to continue at that point.
(See SFC_RESTORE: SFC Save and Restore in the System Library).