Object: Trend Recording
Symbol:
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.
In a trend recording, you configure which data is recorded, where, and in which time interval.
At runtime, CODESYS TargetVisu transfers the configuration to the CmpTraceMgr
runtime system component.
Group: Record Settings
Select the top node of the trend view. This is the trend name. Then the Record Settings are displayed on the right side.
Record by time interval |
Note: When this option is selected, the Interval Settings group is displayed below. There you configure the frequency of the recording by specifying a time interval. |
Record depending on task |
Note: When this option is selected, the Task Settings group is displayed below. There you configure the frequency for the recording by specifying a task. |
Time interval | Example: Select a time unit from the list box (ms, s, m, h, d). |
Task priority (0..31) | Default value: |
Task | Task where the data is recorded This means that the recording is equidistant per task cycle (or a multiple of the task cycle). Example: Click Hint: In general, the trend recording runs in the same task as the main program. |
Task priority (0..31) | Default value: |
Advanced settings | |
Measure in every n-th cycle | Frequency that the runtime system records data, depending on the number of processed task cycles. Select a value from the list box or type a value into the input field. Example: 1h1m1s1ms Example: CODESYS uses the settings from the task configuration to calculate the time interval according to the frequency. Therefore, the calculation is possible only if at least the task cycle time is set. The result is displayed to the right of the input field, outside the table in a standardized style. Time interval, specified as a multiple of the task cycle Default: Hint: The time interval which results in the multiple is displayed after the input field. |
Additional runtime buffer | Length of the time interval when the runtime system can record more data Example: Time interval (in ms) for an additional runtime buffer If a delay occurs when "writing away" data in the runtime system component, then there is a risk of data loss due to overwriting. In this case, the runtime system uses the addition buffer. |
Record condition | Record condition by which the data was recorded:
The contents of a pointer are not permitted. Note: If no condition is defined, then the recording starts automatically. |
Measurement slowdown factor | Factor (numeric data type as literal or variable >= 1 Example: The factor is multiplied by the interval specified in Measure in every n-th cycle. This results in the actual recording interval. Measure in every n-th cycle = 2 and Measurement slowdown factor = 5 means that the measurement is only recorded every 10 task cycles. |
Resolution | Example: ms Resolution which the application saves the timestamp Select a time unit from the list box. Note: If the task where the trend object is executed has a cycle time of 1 ms or less, then you should set the resolution of the timestamp to 1 µs. |
Trend Storage | |
Maximum number of variables | Example: Maximum number of trend variables which can be managed in the database If you increase this value afterwards, then CODESYS will perform a download and reconfigure the database. |
Store every N milliseconds | Time interval (in ms) when the Example: The application internally calculates the number of task cycles from the time interval. The duration of a task cycle is defined in the task configuration. A high value results in a better runtime performance. The disadvantage of this is that the risk of the loss of data is increased in case of a crash or shutdown of the controller. A low value reduces this risk. The disadvantage here is that the control of a trend visualization becomes more sluggish with large amounts of data. |
Limit | |
No limit |
Note: This is not recommended. |
Maximum number of records |
Example: Note: A data set consists of the values of the trend variables and the timestamp. |
Estimated database size | The approximate file size is specified next to the Maximum number of records field. Example: The estimated file size depends on the following:
Therefore, the actual data size may differ significantly. |
Maximum storage size |
In the list box, select a storage unit (kilobyte Example: The application internally calculates the number of data records. |
Group: Variable Settings
Select a variable in the trend view. Then the respective Variable Settings are displayed on the left side.
Variable | Variable for recorded value.
Valid data types are all standard types, except |
Parameters | Parameter for the recorded value The Input Assistant dialog lists all valid system parameters in the Parameters category of the Categories tab. |
![]() | Toggles between Variable and Parameter |
Record condition | Condition for which the application records the data of the variables:
The contents of a pointer are not permitted. Note: If no condition is defined, then the recording starts automatically. |
Attached y axis | Y-axis of the trend diagram that displays the Variable. The list box provides the standard Y-axis and the configured Y-axes. Requirement: This option is visible only when the Trend visualization element has configured additional Y-axes in the Edit Display Settings dialog. |
Display variable name |
Requirement: If any text is typed in Description, then you can disable the option. |
Description | Text for the tooltip (example: When the Display Variable Name property is activated, the text is supplemented with the variable name in brackets. Example: If Description does not contain any text, then Display Variable Name is enabled. The name is then without brackets (for example, If a legend is assigned to the trend, then the trend variable is labeled in the legend and shown like the trend is configured here. |
Curve type |
|
Graph color | Color of the curve in the trend diagram |
Line type |
Requirement: The Curve type is Line. |
Filling type |
Requirement: The Curve type is Area. |
Filling color |
Requirement: The Curve type is Area. |
Transparency | Value (0 to 255) for defining the transparency of the selected color Example Requirement: The Curve type is Area. |
Line width | Value (in pixels) Example: |
Line style | The display of the line is solid, dash, dot, dash-dot, or dash-dot-dot. |
Point type | . Display as a scatter chart
Hint: Select None for larger size data. |
Activate minimum warning |
|
Critical lower limit | If the variable value is below the limit, then the variables are displayed with the alert color in the trend diagram. |
Color | Warning color when the value falls below the limit |
Activate maximum warning |
|
Critical upper limit | If the variable value exceeds the limit, then the variables are displayed with the alert color in the trend diagram. |
Color | Warning color when the value exceeds the limit |
Add Variable | Adds a new variable in the trend configuration. Next, its still blank configuration is displayed on the right side. |
Delete Variable | Removes the selected variable |