部分:alg.Alarm
这部分 SEC alg.Alarm
描述模块报警。模块报警本质上对应于 CODESYS 告警组中已配置的告警管理。但是,模块警报仍然包含特定于模块的添加内容。
规格
SEC alg.Alarm //optional: yes, modifier: [UPDATE] SEC SetAlarm <alarm identifier> //optional: yes, modifier [UPDATE] Class := <class name>; //optional: no, type: ID Message := <TextlistEntry>; //optional: no, type: TextListEntry LatchVar1 := <LatchVariable1>; //optional: yes, type: InstancePath LatchVar2 := <LatchVariable2>; //optional: yes, type: InstancePath Deactivation := <DeactivationVariable>; //optional: yes, type: InstancePath PendingTime := <PendingTime>; //optional: yes, type: LiteralOrConstant PendingTimeParameter := <string> //optional: no, type: literal/string HigherPrioAlarm := <HigherPrioAlarm_ID>; //optional: yes, type: ID ModuleCalls := <ModuleCallFlags>; //optional: yes, type: ModuleCallFlag SEC Messages : <alarm identifier> //optional: yes, modifier: [UPDATE] Message := <TextlistEntry>; //optional: no, type: TextListEntry Number := <ColumnNumber>; //optional: no, type: Literal END_SEC SEC LatchVar <latch var identifier> //optional: yes, modifier [UPDATE] LatchVar := <LatchVariable>; //optional: no, type: InstancePath Number := <LatchVarNumber> //optional: no, type: LiteralOrConstant END_SEC SEC UpperLimit //optional: yes, modifier: [UPDATE] Expression := <Expression>; //optional: no, type: Literal/String IncludeBorder := TRUE/FALSE; //optional: no, type: FlagBool UpperExpression := <UpperExpression>; //optional: no, type: Literal/String Hyteresis := <HysteresisValue>; //optional: yes, type: LiteralOrConstant END_SEC SEC LowerLimit //optional: yes, modifier: [UPDATE] Expression := <Expression>; //optional: no, type: Literal/String IncludeBorder := TRUE/FALSE; //optional: no, type: FlagBool LowerExpression := <LowerExpression>; //optional: no, type: Literal/String Hyteresis := <HysteresisValue>; //optional: yes, type: LiteralOrConstant END_SEC SEC InsideRange //optional: yes, modifier: [UPDATE] Expression := <Expression>; //optional: no, type: Literal/String AreaLow := <AreaLowValue>; //optional: no, type: Literal/String LowIncludeBorder := TRUE/FALSE; //optional: no, type: FlagBool HighIncludeBorder := TRUE/FALSE; //optional: no, type: FlagBool AreaHigh := <AreaHighValue>; //optional: no, type: Literal/String Hyteresis := <HysteresisValue>; //optional: yes, type: LiteralOrConstant END_SEC SEC OutsideRange //optional: yes, modifier: [UPDATE] Expression := <Expression>; //optional: no, type: Literal/String AreaLow := <AreaLowValue>; //optional: no, type: Literal/String LowIncludeBorder := TRUE/FALSE; //optional: no, type: FlagBool HighIncludeBorder := TRUE/FALSE; //optional: no, type: FlagBool AreaHigh := <AreaHighValue>; //optional: no, type: Literal/String Hyteresis := <HysteresisValue>; //optional: yes, type: LiteralOrConstant END_SEC SEC Digital //optional: yes, modifier: [UPDATE] Expression := <Expression>; //optional: no, type: Literal/String Equal := TRUE/FALSE; //optional: no, type: FlagBool EqualsExpression := <Expression>; //optional: no, type: Literal/String END_SEC SEC Change //optional: yes, modifier: [UPDATE] Expression := <Expression>; //optional: no, type: Literal/String END_SEC SEC Event //optional: yes, modifier: [UPDATE] END_SEC END_SEC END_SEC
| 的小节 |
| 警报类名称,将在该名称下创建警报。 如果应用程序中已存在该警报类,则将在该类下创建警报。如果该类不存在,则搜索报警类模板对象,该对象必须存在于 POU 看法。如果没有找到合适的报警类模板对象,则在扫描模块时会发出错误。 |
| ID(格式为 ID 引用的消息可以包含与警报配置中的文本相同的占位符。例如占位符,例如 如果找不到指定的文本列表条目,则会在扫描期间发出警告。 对应于 信息 设置在 报警组 目的。 |
| 占位符变量 在当前模块特定报警的情况下,只能直接从模块功能块指定变量(就像在模块声明中为参数指定变量一样) 对应设置 锁存变量1 / 锁存变量2 对于占位符 |
| 失活变量(
如果输入的变量类型不是 对应于 停用 设置在 报警组 目的。 |
| 最短的等待时间。定义达到极限后警报实际响起之前的时间量。 例子: 对应设定 分钟。等待时间 在里面 报警组 目的。 |
| 设置最小挂起时间的参数 分配给参数的值是一个可以解释为时间的字符串。或者也可以作为由模块参数和时间文字组成的表达式。 . 例子:
|
| 高优先级告警ID 为了识别当前警报应该被分类到的警报,一个警报的目标ID 对应设定 优先级更高。警报 在里面 报警组 目的。 |
| 对于特定于模块的报警管理,模块 FB 可以提供特定的接口,在发生模块报警时可以调用这些接口。这些标志定义了在什么情况下会发生这种情况。 . 可用的 ModuleCallFlags :
将由该标志调用的模块 FB 必须实现 如果 |
| 该小节管理与
|
| 锁存变量。此部分最多可以定义 10 个锁存变量。 如果除了本节之外,
|
| 超出上限或下限时触发的警报的警报条件。 该部分仅允许在以下出现一次
对应设置 上限 / 下限 对于观察类型 报警组 目的。 |
| 如果表达式位于特定值范围内或之外,则触发警报的警报条件。 该部分仅允许在以下出现一次
对应设置 范围内 / 范围外 对于观察类型 报警组 目的。 |
| 如果两个表达式相互比较,则会引发警报。 该部分仅允许在以下出现一次
对应观察类型 数字的 在里面 报警组 目的。 |
| 如果表达式更改其值,则会引发警报。 该部分仅允许在以下出现一次
对应观察类型 改变 在里面 报警组 目的。 |
| 确定当前报警部分创建事件报警。该警报可以通过以下功能触发 |
例子
SEC SetAlarm : ValueRange Class := Error; Message := TL.Alarm_Temperature; LatchVar1 := rAlarmValueLow; LatchVar2 := rAlarmValueHigh; ModuleCalls := THIS | PARENTS; SEC Messages : msg2 Message := TL.msg5_Message; Number := 5; END_SEC SEC OutsideRange Expression := 'rValue'; AreaLow := 'rAlarmValueLow'; LowIncludeBorder := TRUE; HighIncludeBorder := TRUE; AreaHigh := 'rAlarmValueHigh'; END_SEC END_SEC
PendingTime
SEC alg.Alarm SEC SetAlarm : NoVar Class := AlarmClassTemplate; Message := TL.NoVar_Message; PendingTimeParameter := 'NoVar'; SEC Digital Expression := 'xAlarm'; Equal := TRUE; EqualsExpression :='TRUE'; END_SEC END_SEC SEC SetAlarm : WithVar Class := AlarmClassTemplate; Message := TL.NoVar_Message; PendingTimeParameter := 'WithVar'; SEC Digital Expression := 'xAlarm'; Equal := TRUE; EqualsExpression :='TRUE'; END_SEC END_SEC SEC SetAlarm : SimpleMath Class := AlarmClassTemplate; Message := TL.NoVar_Message; PendingTimeParameter := 'WithVar - NoVar + TIME#5S'; SEC Digital Expression := 'xAlarm'; Equal := TRUE; EqualsExpression :='TRUE'; END_SEC END_SEC SEC SetAlarm : NoParam Class := AlarmClassTemplate; Message := TL.NoVar_Message; PendingTime := TIME#5S; SEC Digital Expression := 'xAlarm'; Equal := TRUE; EqualsExpression :='TRUE'; END_SEC END_SEC END_SEC