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:

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

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

    • ST/FBD debugging is not possible in a logi.CAD 3 v ersion < 3.21.0 , if the workspace contained a blank when logi.CAD 3 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 logi.CAD 3.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.

The user documentation of logi.CAD 3 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

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.