-

Extended Debugging: Functions, Methods and SFC Actions/Transitions

The Cockpit provides several toolbar buttons for enabling extended debug features. When enabled, additional code is generated and executed which then supports these debug operations. Even forcing/overwriting and the use of breakpoints is possible while the option is activated.

To debug methods, inline transitions, and actions, activate the 'Debug Functions' toolbar button:

Activating the button opens the 'Debug Code Settings' dialog. In the dialog, select the items you want to debug. (In order to keep processor load and memory consumption as low as possible, mark only those items (POUs) that are really required.)

Note
The Debug Function mode requires additional code that must be generated by the compiler. Therefore,
  • the mode must be activated before compiling and writing the project to the controller. Due to the additional code,
  • the mode increases the controller cycle time and memory consumption.

WARNING
Unintended machine operation
  • Prior to using the Debug Function mode, make certain that suitable organizational measures (according to applicable sector standards) have been taken to avoid hazardous situations if the increased controller cycle time results in an application logic that functions in an unintended or incorrect way.
  • Determine the impact of an increased cycle time on the application performance before using the Debug Function mode, and make sure that no hazards can result from a decreased performance.

When switching to the extended debug mode 'Debug Functions', the PLANT shows the following: Each call of a function is visible as separate instance node (named 'functionname_Debug') under the respective program or FB instance node.

Example:

Note
Deactivate this extended debugging feature for normal operation, i.e., after debugging.