Control flow debugging: Debugging the application by setting breakpoints

Such a →debugging session lets you see what is going on "inside" an application while it executes on the →PLC (in contrast to the debugging of data). You are able to use the following code in order to debug the application:

  • C-code – This C-code is automatically created for the application created by you. Debugging based on the C-code will be called C debugging in the following.

    Observe:

    Depending on the used variant of Neuron Power Engineer,  you are able to debug applications loaded onto the following PLCs and target systems respectively:

    PLC/target system

    Possible within

    built-in PLC

    all variants of Neuron Power Engineer

    target systems, based on Linux→phyBOARD-Regor→phyBOARD-Wega→Raspberry Pi, →Revolution Pi and when using the platform LinuxX86

    extended version of Neuron Power Engineer

    If you edit and save the source files (such as ST-objects) during a debugging session, the created C-code might not match the information within the debugging session anymore. This might cause unexpected jumps within the debugging session.

  • ST-code or FBD-logic – You create the ST-code by using the ST-editor or the FBD-logic by using the FBD-editor. Debugging based on the ST-code and/or FBD-logic will be called ST/FBD debugging in the following.

    Observe:

    • ST/FBD debugging is only supported for the built-in PLC.

    • A previously started version of Neuron Power Engineer prevents the debugging in the later started version of Neuron Power Engineer.Solution: Exit all versions of Neuron Power Engineer. Then start the version of Neuron Power Engineer in which you want to debug the application.

    • ST/FBD debugging is not possible in a Neuron Power Engineer version < 3.21.0, if the workspace contained a blank when Neuron Power Engineer has been started. See "Blanks within the workspace prevent the control flow debugging for ST/FBD".

    • ST/FBD debugging is not provided in all variants of Neuron Power Engineer.Moreover, a license is required.

The best practice for learning how to debug your application loaded onto the PLC is to use a simple example project. For the built-in PLC, you might want to use the project Counter and load into onto the built PLC. This project has been created based on the tutorial "The first loadable application: testing with integrated PLC" and based on the sample project Counter (ST).

Follow the instructions in the specified order.

Articles in this section:

The user documentation of Neuron Power Engineer contains just an introduction to the debugging features. If you need more information, please consult the current release of the Eclipse documentation (provided under http://www.eclipse.org/documentation/).

Good to know

(grey lightbulb) If you rename an existing project for which you have already opened a debugging session, you must repeat all instructions beginning with "Setting breakpoints within code" at least.