Trace

The trace component provides the online view of the variable values in the PLC code. These values are not stored. Data points are completely managed from the CoDeSys code.

Insert a trace diagram

To insert a trace diagram into the editor, simply click on the trace icon (1) and it will appear in the container.

Add default properties for the X and Y axis

Then we add default properties for the X and Y axis (2)

Configure properties

  1. Choose a label for the X axis
  2. Add the max number of points you want for a single trace
  3. This is default set to “HH:mm:ss” but you can change it
  4. Change the default colours
  5. Determine the Y axis min for example „-55“
  6. And the Y axis max for example „55“

For a more detailed explanation of the format settings you can look here.

Trace legend

  1. You can decide if and where you want to show your legend

CODESYS example

CODESYS example download

  1. The eDESIGN library contains a CODESYS project - trace example that you must download

tracePrg folder

  1. Open the tracePrg folder
  2. In line 1 and 18 you will find the code that will be executed
  3. Initialize your scales here
  4. And define your datasets here
  5. These methods are used to set the values of a trace

Check the symbol configuration and tick all necessary checkboxes

  1. To expose the myGraph function block to the eDesing, you need to check the symbol configuration and tick all necessary checkboxes. After you rebuild and download the newest code to the PLC, you can run the program.

Connect „myGraph“ variable in connection settings

  1. Now you should be able to connect „myGraph“ variable in connection settings