Skip to main content

Section: Trend

SEC tre.Trend                                          //optional: yes, modifier: [UPDATE]
    SEC TrendRecording : <CFC trend identifier>        //optional: yes, modifier: [UPDATE]
            Task := <trend task>                           //optional: yes, type: TimeLiteral
            CycleTime := <time value>                      //optional: yes, type: TimeLiteral
            LimitType := <limit type>                      //optional: yes, type: FileLimitType
            LimitMaximum := <max bytes>                    //optional: yes, type: Literal
            RecordCondition                                //optional: yes, type: InstanceAccess
            SEC Visu                                       //optional: yes, modifier: [UPDATE]
                    VisuPlaceholder                            //optional: yes, type: StringLiteral
                    VisuTemplate := <visu template>            //optional: yes, type: StringLiteral
                    Target := <path module instance            //optional: yes, type: StringLiteral
            END_SEC
    END_SEC

    SEC TrendVariable : <variable identifier>          //optional: yes, modifier: [UPDATE]
            Variable := <variable name>                    //optional: yes, type: InstanceAccess
            TrendRecording := <recording name>             //optional: no, type: : Id)
            Description := <tooltip>                       //optional: yes, type: TextRef
            Color := <graph color>                         //optional: yes, type: Literal
            GraphType := <graph type>                      //optional: yes, type: GraphType
            LineWidth := <width>                           //optional: yes, type: Literal
            LineStyle := <line style>                      //optional: yes, type: LineStyle
            SEC Warning  : MIN/MAX                         //optional: yes, modifier: [UPDATE]
                    Limit := <limit value>                     //optional: no, type: Literal
                    Color := <limit color>                     //optional: yes, type: Literal
    END_SEC
    END_SEC
END_SEC

Details regarding the syntax of definition types are described in the section Module Declaration.

. Specification:
  • Task: Defines the task for the trend recording. If no task is defined, the task, automatically created by the visu trend will be used.

  • CycleTime: Cycle time of the trend recording

  • LimitType: Type of the limitation of the recorded trend.

  • LimitMaximum: Maximum size of the trend recording in KB (only with LimitType ==FileLimit).

  • RecordCondition: Recording condition. The referenced variable must be of type BOOL.

  • VisuPlaceholder: Placeholder, replaced by the generated trend visualization.

  • VisuTemplate: Template for the visu to be created. The template must have a placeholder Trend_Placeholder. It can hold controls with the following identifier:

    • TrendLegend -> type: Legend

    • TrendTimeRangeSelector -> type: Time Range Picker

    • TrendDateRangeSelector -> Type: Date Range Picker

  • Target: Relative path to the module instance, in which the visualization will be embedded.

  • Variable: Variable to be recorded.

  • TrendRecording: TrendRecording object the variable belongs to.

  • Description: Text list entry, which will be displayed for the variable as tooltip.

  • Color: Colors of the graph of the variable as ARGB color code

  • GraphType: Type of the graph

    • LineWithPoints: Lines with points

    • Cross: Crosses

    • StepWithPoints: Steps with points

    • Point: Points

    • Lines: Lines

    • Step: Steps

    • LinesWithCrosses: Lines with crosses

    • \\ StepWithCrosses: Steps with crosses

  • LineWidth: Width of the drawn line. Value range: 1 to 255.

  • LineStyle: Line style

    • Solid: Solid

    • Dashed: Dashed

    • Dotted: Dotted

    • DashDotted: Dash dotted

    • DashDotDotted: Dash dot dotted

  • Warning: This subsection must have the target MAX or MIN. Depending on the target the overrun or underrun will trigger the warning.

    • Limit: Begin of the critical range.

    • Color: Color for the critical range as ARGB color code

Example 24. Example
SEC tre.Trend
        SEC TrendRecording : TrendSensor
                SEC Visu
                        VisuPlaceholder := 'TrendPlaceholder_TrendSensor';
                        VisuTemplate := 'AC_Trend.GenTrend_VisuTemplate';
                END_SEC
                CycleTime := t#5s;
                LimitType := Records;
                LimitMaximum := 452;
        END_SEC
        SEC TrendVariable : Value
                Variable := value;
                TrendRecording := TrendSensor;
                Color := 16#FF00FF00;
                SEC Warning : MIN
                        Limit := -5;
                        Color := 16#FF101020;
                END_SEC
                GraphType := LinesWithCrosses;
                LineWidth := 3;
        END_SEC
END_SEC