Home

mlamp
There is a newer version of this page. You can find it here.

Download project

Trend Example

The example project shows how to visualize and record values with the "Trend" element.

Product description

The example project "TrendExample" contains three applications with different "Trend" configurations.

Following features are described in the example:

  • Conditional recording of values
  • Long term recording of values
  • Multiple recording of values

More information on the "Trend Element" and its configuration can be found in the CODESYS Help:

CODESYS Visualization > Visualization Elements > 'Special Controls' > 'Trend'

More information

Application ConditionalRecording

The recording of values can be triggered by a recording condition. The example generates a sine signal
with amplitude of 500. The signal is recorded, if the amplitude is greater or equal 200.
The recording condition can be set in the section "Recording Settings" of Trend Recording Manager.

Application LongTermRecording

This example shows how to configure the trend element for long term recordings. The example simulates
the power of a solar station. The power rCurrentPower will be recorded every 20 seconds and will be stored
in the database every minute. You can set the recording interval via the dialog "Advanced Trace Settings" and
the field "Measure in every n-th cycle". The storage interval can be set by the field "Store every N milliseconds"
in the dialog "Trend Storage".

Application SimpleTrendExample

The example application generates three signals which are recorded and visualized by the trend element.
The recording can be started with the Record button.

Screenshot thumbnail
Application ConditionalRecording
Screenshot thumbnail
Application LongTermRecording
Screenshot thumbnail
Application SimpleTrendExample