Home

mlamp

Download project

Trace Example

The example "Trace Example" contains two applications concerning trace recording and
trace configuration in IEC 61131-3 via the Trace Manager.

Product description

The example project "TraceExample.project" shows how to record and store values of variables
via the Trace Object and the Visu Trace Element. Another application demonstrates the configuration
of a Trace Object in Structured Text.

More information on the Trace Object and the Visu Trace Element can be found in the CODESYS help:

CODESYS Development System > Reference, User Interface > Objects > Object 'Trace'

and

CODESYS Visualization > Visualization Elements > 'Special Controls' > Element 'Trace' and its Dialogs

More information

Application TraceRecordingExample

The application TraceRecordingExample demonstrates how to record and store values of variables via
the Trace Object and Visu Trace Element.

Steps to save and load recordings via the Visu Trace Element:

  • Configure the trace element
  • Start the trace
  • Start the trigger
  • Store the trace
  • Load the trace (Restriction: Works only if the trace was saved with the currently running application)

Steps to save and load recordings via the Trace Object:

  • Configure the trace element
  • Download the trace (trace menu)
  • Start the trace via trigger or recording condition
  • Store the trace (trace menu)
  • Load the trace (trace menu)

Application IECTraceConfiguration

The application IECTraceConfiguration configures a Trace Element directly via Structured Text.
The corresponding functions of the Trace Manager are implemented in the library CmpTraceMgr.
Trace objects receive their data from a Packet. A Packet can hold one or more Records.
The variable to record is assigned to a Record.

The program PLC_PRG creates and configures a Packet and a corresponding Record.
The function block FBTracMgr encapsulates the functions and handles of the Trace Manager CmpTraceMgr.

The programmatically configured Trace can be loaded into a Trace Object with the function "Upload Trace"
in the trace menu.

System requirements and restrictions

System requirements and restrictions Info
Programming System CODESYS Development System Version 3.5.14.0 or higher
Runtime System CODESYS Control Version 3.5.14.0
Required Accessories -

Screenshot thumbnail
Application TraceRecordingExample
Screenshot thumbnail
Trace of the application IECTraceConfiguration