You can configure a database on the runtime system and the data buffering.




NOTICE

Timeout for trend recording
During a trend recording, it can happen that the application task triggers a timeout that is caught with an exception when transitioning from “Running” to “Stop”. Causes can be that file operations with the SQLite database are taking too long or that too many variables are being recorded. This usually happens on a target device with weak performance.
You can avoid the occurrence of an exception:
-
Configure the trend recording with less memory demand so that the amount of data that is stored is adapted to the target system.
-
Reduce the number of variables.
Assigning tasks
In this task, the runtime system records the trend.
In general, trend recording runs in the same task as the main program (for example,
PLC_PRG
).
-
Double-click a “Trend Recording” object in the device tree.
The respective editor opens. In the tree view of the trend configuration, the top entry is selected, and on the right you see the current configuration in “Record Settings”.
-
Click the "arrow down" symbol (
) in the “Task” drop-down list.
The drop-down list opens with all tasks that are available throughout the application.
-
Select a task for trend recording.
See also
Adding IEC variables




NOTICE

The number of variables is limited for trend recording. You can change this number in the “Trend storage” dialog.
-
Double-click a “Trend Recording” object in the device tree.
The respective editor opens. In the tree view of the trend configuration, the top entry is selected, and on the right you see the current configuration in “Record Settings”.
-
Right-click an entry in the tree view.
-
Click “Add Variable”.
CODESYS adds another variables. The blank settings open in the “Variable Settings” to the right of the tree view.
-
Select a valid IEC variable from the “Variable” field.
The IEC variable is configured for trend recording.
-
Configure how the variable is displayed in the trend diagram.
-
Configure how the alert color is displayed in the trend diagram.
Removing variables from the configuration
-
Double-click a “Trend Recording” object in the device tree.
-
Click a variable in the tree view of the configuration.
-
Click “Delete Variable” or press [Del].
Starting conditional trend recording
You can configure conditional trend recording for execution. Configuration is not possible when depending on triggering. For that you need a “Trace” object.
-
Double-click a “Trend Recording” object in the device tree.
-
Click the top node in the tree view of the trend configuration.
The name of the trend configuration is selected and on the right you see the current configuration in “Record Settings”.
-
Assign a Boolean variable, an access to a bit, or a property to the “Record condition” field.
When the application is in runtime mode, data is recorded only if the value is
TRUE
.
See also
Adding parameter
-
Double-click a “Trend Recording” object in the device tree.
The respective editor opens. In the tree view of the trend configuration, the top entry is selected, and on the right you see the current configuration in “Record Settings”.
-
Right-click an entry in the tree view.
-
Click “Add Variable”.
CODESYS inserts a new variable. The blank settings open in the “Variable Settings” to the right of the tree view.
-
Click the "down" symbol (
) to the right of the “Variable” label.
-
Select “Parameter” from the drop-down list.
-
Click
and select a parameter from the “Input Assistant” dialog.
-
Configure how the parameter is displayed in the trend diagram.
-
Configure how the alert color is displayed in the trend diagram.
See also
Configuring data buffering on the RTS
-
Double-click a “Trend Recording” object in the device tree.
The respective editor opens. In the tree view of the trend configuration, the top entry is selected, and on the right you see the current configuration in “Record Settings”.
-
Click “Trend Storage”.
The “Trend Storage” dialog opens.
-
Now you can change the settings.
See also
Configuring additional buffering
-
Double-click a “Trend Recording” object in the device tree.
The respective editor opens. In the tree view of the trend configuration, the top entry is selected, and on the right you see the current configuration in “Record Settings”.
-
Click “Advanced”.
The “Advanced Trace Settings” dialog opens.
-
Now you can change the settings.
See also