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 logi.CAD 3, 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 logi.CAD 3

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

      extended version of logi.CAD 3

    • 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:

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.

The user documentation of logi.CAD 3 contains just an introduction into 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

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/lightbulb.svg 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.