A trace can be used to follow the value curve of variables in the CPU.

alternate text

The Trace Object

An object of type Trace is used to configure and display application-specific trace data in one or more charts. At application runtime, value curves of trace variables, which you can monitor in the trace editor in CODESYS during this time, are recorded on the controller. To monitor an object in the trace editor during runtime, a trace configuration must be configured and transferred to the controller, and the trace recording must be started.

At application runtime with trace, all statements are executed first within the task cycle. Then, data sampling starts with value storage including time stamps. These time stamps are relative to the start time of the data sampling. The data yields a discrete time signal and CODESYS displays its course in the trace editor. With this element, you can integrate a trace graph in the visualization that monitors and displays variable values permanently.

You configure the displayed trace graph in the element properties. In addition, you can add controls that control the trace functionality. This is done manually or by means of the Insert Elements for Controlling Trace command.

The sampled data is transmitted to the development system and displayed in charts according to the configuration.

You can navigate through the data when tracing.

Detail Usage and Example

For additional help and an example project refer to Trace