Getting Started
Program PLC_PRG
PROGRAM PLC_PRG VAR iVar : INT; rSin : REAL; rVar : REAL; END_VAR iVar := iVar + 1; iVar := iVar MOD 33; rVar := rVar + 0.1; rSin := 30 * SIN(rVar);
Requirement: The application is running the PLC_PRG
program on the PLC.
In the device tree, select the application and click
to add a new trace object.The corresponding trace editor opens with the commands available in the
menu.Click
.The Trace Configuration dialog opens.
Select a task for running the trace feature. Normally this is the same task that is running in PLC_PRG.
Click Add Variable to add an entry to the tree view of the trace configuration and assign an IEC variable.
Example:
PLC_PRG.rSin
Click
.CODESYS downloads the trace configuration to the controller. The application starts the data sampling and transfers the data to CODESYS. Then they are displayed as a graph in the trace diagram. Commands are provided for navigating through the samples and controlling the data sampling.
Example
PLC_PRG.rSin
The PLC_PRG
program is running on the controller. When you follow the instructions for "Getting Started", CODESYS displays the following trace diagram.

(1): Configuration
(2): Add Variable