Skip to main content

Using the Profiler Watch List

Important

The implicitly added IEC code for a Profiler measurement method, as well as the breakpoints for POUs in the watch list, result in a change and slows down the evaluated program.

When a profiling or code coverage measurement is active, an online is generally not possible. Moreover, some online features are not available, such as "flow control" and "breakpoints". There are no restrictions for the watch list in this respect.

Enabling or disabling a Profiler measurement method, or changing any settings in the Profiler editor each requires a download. Then an online change is no longer possible. There are no restrictions for the watch list in this respect.

In CODESYS, the Profiler Watch List is provided with CODESYS Profiler. In this view, you can combine a selection of POUs or POU instances whose runtimes and calls that you want Profiler to measure. The configuration is possible in both online mode and offline mode.

When you select a POU for the Profiler Watch List, a watch point is set implicitly at the first and last break point position of the POU. The time difference between the two watch points on the controller is measured. In the case of a function block, the measurement is also performed and displayed for all POU instances.

Important

The Profiler Watch List can have a very different impact on the task runtime, depending on how often the implicitly set execution points are started.

When a function block instance is entered in the watch list, the execution points for all instances of the corresponding function block are reached. However, time is measured only for the specified instance.

The Profiler Watch List is suitable for measuring the runtime of individual POUs in runtime mode. The major advantage of this method is that it does not require any special code and it is always available.

Procedure. Configuring watch lists

Requirement: A project exists with an application which calls different program and function blocks as well as function block instances.

In this example, you configure the list in offline mode:

  1. Open the project and click Online → Profiler → Profiler Watch List.

    The empty Profiler Watch List opens.

  2. Drag one of the application POUs from the device tree to the watch list.

    The POU is inserted into the first line of the list. The POU column contains the POU name, and the Application column contains the name of the respective application.

  3. Add all additional required POUs, either by dragging them to the list or by double-clicking a field in the POU column to open the Input Assistant.

Now view the list in online mode:

  1. Download the project to the controller and start it. Open the Profiler Watch List.

    You see measurement results about the call durations and number of calls for each POU. See the help page for the Profiler Watch List.

  2. Click Display Mode in the context menu of the watch list and change to another data type or unit.

    All current results in the list are displayed continuously in the selected format, as is the case for monitoring.

  3. Click Open POU in the context menu of the watch list.

    The POU currently in focus in the list is opened in the editor. You see the solid green circle of the watch point at the beginning and end of the implementation code that is implicitly set to enable the Profiler measurement.

  4. Drag another POU to the watch list.

    The POU is included immediately in the measurement.

For more information, see: Using the Profiler Watch List