Skip to main content

部分: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

有关定义类型语法的详细信息,请参阅 部分 模块声明

. 规格:
  • Task:定义趋势记录的任务。如果未定义任务,则将使用由可视趋势自动创建的任务。

  • CycleTime:趋势记录的周期时间

  • LimitType:记录趋势的限制类型。

  • LimitMaximum:趋势记录的最大大小,以 KB 为单位(仅适用于 LimitType ==文件限制)。

  • RecordCondition:记录条件。引用的变量必须是 BOOL 类型。

  • VisuPlaceholder:占位符,由生成的趋势可视化替换。

  • VisuTemplate:要创建的视觉模板。模板必须有占位符 Trend_Placeholder。它可以保存具有以下标识符的控件:

    • TrendLegend -> 类型:图例

    • TrendTimeRangeSelector -> 类型:时间范围选择器

    • TrendDateRangeSelector -> 类型:日期范围选择器

  • Target:将嵌入可视化的模块实例的相对路径。

  • Variable:要记录的变量。

  • TrendRecording:变量所属的 TrendRecording 对象。

  • Description:文本列表条目,将作为工具提示为变量显示。

  • Color:变量图形的颜色,作为 ARGB 颜色代码

  • GraphType:图表类型

    • LineWithPoints:带点的线

    • Cross: 十字架

    • StepWithPoints:有积分的步骤

    • Point: 积分

    • Lines: 线路

    • Step: 脚步

    • LinesWithCrosses:带十字线

    • \\ StepWithCrosses:带有十字的台阶

  • LineWidth:绘制线的宽度。值范围:1 至 255。

  • LineStyle:线条样式

    • Solid: 坚硬的

    • Dashed: 虚线

    • Dotted: 点状

    • DashDotted: 虚线点

    • DashDotDotted:点划线

  • Warning:此小节必须有目标 MAX 或者 MIN。根据目标,溢出或欠载将触发警告。

    • Limit:临界范围的开始。

    • Color:临界范围的颜色为 ARGB 颜色代码

24. 例子
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