报警分组

我需要将报警在数个报警控件里显示,如何在一个报警控件里选择出需要显示的报警

最佳答案

报警控件属性 -> Control Properties -> MsgFilterSQL,填入相应的筛选语句即可。

比如:
CLASS IN(8) AND TYPE IN(122) //筛选“Operating”消息
CLASS IN(2) AND TYPE IN(19, 20) //筛选“Warning”消息
#VisibleOnly\\TEXT2 LIKE '急停' //筛选“急停”区域消息
#VisibleOnly\\CLASS IN(1) AND TYPE IN(1, 2) AND TEXT2 LIKE '工艺段' //筛选“工艺段”区域“Alarm”消息

也可以用脚本写入按钮脚本,比如:
char *filter = "#VisibleOnly\\CLASS IN(1) AND TYPE IN(1, 2) AND TEXT2 LIKE '工艺段'";
SetPropChar(lpszPictureName,"消息控件名","MsgFilterSQL", filter );

常见的SQL字段参数有:
Class:
1~Alarm红底白字
2~Warning黄底黑字
3~Tolerance蓝底白字
4~PLC process control messages黑底黄字
5~OS process control messages黑底黄字
6~Preventive maintenance黑底黄字
7~Process message青底白字
8~Operating messages青底白字
9~Request for Operator Input紫底白字
10~Operator Input Message紫底白字
16~Status Message青底白字
17~System, must be acknowledge灰底黑字
18~System, need not be acknowledge灰底黑字

Type:
1~Alarm High
2~Alarm Low
19~Warning High
20~Warning Low
37~Tolerance High
38~Tolerance Low
55~Failure
56~Error
71~Failure
72~Error
89~Maintenance.
106~Process message.
122~Process message.
139~Request for Operator Input.
156~Operator Input Message.
253~Status PLC
254~Status OS
257~Process control system
258~System messages
273~Process control system
274~Operator input message.

TEXT1~Source
TEXT2~Area
TEXT3~Event
TEXT4~Batch name
TEXT5~Operation
TEXT6~Free 1
TEXT7~Free 2
TEXT8~Free 3
TEXT9~Free 4
TEXT10~Free 5

更多信息可以在 WinCC 信息系统中搜索 MsgFilterSQL。

提问者对于答案的评价:
谢谢

原创文章,作者:more0621,如若转载,请注明出处:https://www.zhaoplc.com/plc266320.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2019年6月11日
下一篇 2019年6月11日

相关推荐