Setting breakpoints within code
Set at least one →breakpoint in the code or the logic. This procedure depends whether it is a code or a logic.
Restriction for a debugging session for the built-in PLC
Do not set a breakpoint onto a code line or for a FBD-logic that is run by several →tasks . This restriction results from malfunctions of the debugger, if several tasks are interrupted at the same time.
Setting breakpoint within C-code or ST-code
Open the appropriate file or the appropriate object:
File with C-code
Double-click the file containing the C-code to open the file.
The file lcxx___name.c contains the C-code for the element name as the name has been entered e.g. in the ST-code. xx is replaced by pu for a program, by fu for a function block or a function, by dt for a data type. Example: The file lcpu___counter.c contains the C-code as it has been created for the ST program Counter.File with ST-code
Double-click the ST-object to open the ST-editor.
Point to the border left of the code that is executed and for which you want to set a breakpoint.
Examples for code that is executed: →assignments, →calls, IF statements
Examples for code that is not executed: comments, declarationsOpen the context menu and select Toggle Breakpoint. Alternative: Double-click.
Result: is displayed at the border of the code.
Setting breakpoint within FBD-logic
Open the FBD-object.
Open the context menu for an FBD-element and select Toggle Breakpoint. See "Setting breakpoints for the calls of blocks and value fields" for details.
Result: is displayed for the FBD-element.
Disabling, enabling or skipping the set breakpoints
You are able to disable and enable any set breakpoint at any time. This is only possible, if the perspective Debug has already been opened.
Step |
Result |
|
is displayed at the border of the code.
is displayed for the FBD-element. |
|
is displayed at the border of the code.
is displayed for the FBD-element. |
You are also able to skip all breakpoints in one go, if the perspective Debug has already been opened.
Step |
Result |
In the menu Run, select the command Skip All Breakpoints. |
is displayed at the border of the code.
or
is displayed for the FBD-element. |
If you want to have the breakpoints considered again, select the command Skip All Breakpoints anew or click the button again. Now the breakpoints are enabled or disabled – as the breakpoint has been before it has been skipped.