7/2/2013 3:14 PM | |
Joined: 10/3/2010 Last visit: 3/14/2024 Posts: 1552 Rating: (188) |
How do you set the filter? direct in property or with c-script? You probably forgot wildcards and your filter searches only on exact "text" working example for c-script: char cMsgFilter[200]; sprintf(cMsgFilter, "CLASS IN (11) AND TYPE IN (161) AND TEXT1 LIKE \'%%text%%\' "); //printf("%s\r\n",cMsgFilter); SetPropChar(lpszPictureName,"AlarmControl","MsgFilterSQL",cMsgFilter); Although FAQ tells different, I've used the above in a previous project succesfully. Remember that AlarmControl V7 vs prior versions is a little different. |
Last edited by: SteBo at: 7/2/2013 3:19 PMB r g d s , |
|
This contribution was helpful to1 thankful Users |
7/9/2013 10:01 AM | |
Joined: 10/3/2010 Last visit: 3/14/2024 Posts: 1552 Rating: (188) |
today, came across something about LIKE, found in the CustomizedControls-project (available from this siemens site): New in V7: - Wildcards in LIKE-statements: - multiple characters: "%" - must be used in V7 (not allowed in V6) - single character: "_" - if you need wildcard "%" and/or "_" as fixed part of a string, use [ and ]
example: "Text1 LIKE "Text 10[%]" --> Text 10% |
B r g d s , |
|
10/24/2013 10:29 AM | |
Joined: 10/3/2010 Last visit: 3/14/2024 Posts: 1552 Rating: (188) |
WinCC MsgFilterSql does not understand every syntax that you can use in normal SQL query, NOT LIKE won't work. Description (not complete) is here |
Last edited by: SteBo at: 10/24/2013 10:30 AMB r g d s , |
|
10/24/2013 10:55 AM | |
Posts: 16 Rating: (0) |
OK! thx! how i can do my sentence for work in that way?? C language isn't in my skills :D Regards |
10/24/2013 11:44 AM | |
Joined: 10/3/2010 Last visit: 3/14/2024 Posts: 1552 Rating: (188) |
one way is to use another "User text block", if you have one free, and create keywords in it like "TEMPERATURE", "PRESSURE", ... corresponding to the message type and then you can use the LIKE-statement again. |
B r g d s , |
|
10/24/2013 1:04 PM | |
Joined: 10/3/2010 Last visit: 3/14/2024 Posts: 1552 Rating: (188) |
I know but in that case, you should try to have a better set of classes, types and (user) text fields. That way you can define a working filter for selecting only those kind of messages that should be included instead of trying to exclude message with a non-working "NOT LIKE" statement. If that's too much work or not possible, try reading WinCC Information System and search for "hide mask", it might be another option for you. |
B r g d s , |
|
Follow us on