Overview

Sample tracing will be available as an object in the resources, if it is activated in the target settings (category ‘General’). It can be used to trace the progression of values for variables is traced over a certain time. These values are written in a ring buffer (trace buffer). If the memory is full, then the “oldest” values from the start of the memory will be overwritten. As a maximum, 20 variables can be traced at the same time. A maximum of 500 values can be traced per variable.

Since the size of the trace buffer in the PLC has a fixed value, in the event of very many or very wide variables (DWORD), fewer than 500 values can be traced.

Example

If 10 WORD variables are traced and if the memory in the PLC is 5000 bytes long, then, for every variable, 250 values can be traced.

In order to be able to perform a trace, open the object for a ‘Sampling Trace’ in the ‘Resources’ register card in the Object Organizer ( Object Organizer). Create or load an appropriate trace configuration and define the variables to be traced.

After you have created the configuration and have started the trace in the PLC with ‘Start Trace’ ( ‘Extras’ ‘Start Trace’), then the values of the variables will be traced. With ‘Read Trace’ ( ‘Extras’ ‘Read Trace’), the final traced values will be read out and displayed graphically as curves.

A Trace (variable values and configuration) can be saved and reloaded in project format (*.trc) or in XML format (*.mon). Just the configuration can be stored and reloaded via a *.tcf-file.

Various traces can be available in a project for getting displayed. They are listed in a selection list (‘Trace’) in the upper right corner of the trace window. You can select one of those to be the currently used trace configuration.

Note

If a Task Configuration is used for controlling the program, the trace functionality refers to the debug task.