10/2/2015 12:14 PM | |
Joined: 9/23/2005 Last visit: 11/19/2024 Posts: 4353 Rating: (1454)
|
“Simple Samples” are small projects that demonstrate simple features. The target is give a quick overview about the theme and be used as start point for related discussions. Follow there are a short description and the configuration main steps.
Description:
The WinCC Professional Alarms Control has already a very nice tool that allow to configure static (offline) and dynamic (online) filters for alarms. Despite of it, in some applications, it should interesting to filter alarm text by scripting.
By clicking on button (or filling a IO field) alarms that came after a specific date / time are showed in the Alarm view object.
Requirements: WinCC Professional V13 SP1.
Project with a minimum configuration (stop - See references “WinCC Professional V13 SP1 – Simple Sample: Discrete Alarm” https://support.industry.siemens.com/tf/br/en/posts/135058/ ).
Configuration main steps:
Open a screen Create a button Configure in button click event the follow script:
Sub OnClick(ByVal item)
Dim aaa
'create reference to AlarmControl Set aaa = ScreenItems("Alarm view_1")
aaa.MsgFilterSQL = "DATETIME >= '2015-07-21 16:34:05.0'"
End Sub
Notes:
Dim bbb Dim ccc
'read desired time bbb = Now()-1/24
'build filter key ccc = "DATETIME >= '" & Year(bbb) & "-" & Month(bbb) & "-" & Day(bbb)& " " & Hour(bbb) & ":" & Minute(bbb) & ":" & Second(bbb)& ".0'"
References: Manual WinCC Professional V13.0 https://support.industry.siemens.com/cs/br/pt/view/92323076/en
Online helps system WinCC Professional V13.0 SP1 https://support.industry.siemens.com/cs/br/pt/view/109096785/en
FAQ
Despite of made by WinCC V6, this FAQ gives a guide to configure alarm filters based on C Scripting for different keys (Class, text, etc.).
How do you use the "MsgFilterSQL" property of the WinCC Alarm Control in order employ an SQL statement to filter the messages to be displayed? https://support.industry.siemens.com/cs/br/pt/view/5668269/en
Which VBS information and VBS programming tools are there in WinCC (TIA Portal)? https://support.industry.siemens.com/cs/br/pt/view/59885894/en
Tips and tricks for creating scripts in WinCC (TIA Portal) https://support.industry.siemens.com/cs/br/pt/view/57132412/en
https://support.industry.siemens.com/cs/br/en/view/109478866
Project: as project.zip AttachmentProjeto.zip (211 Downloads) |
Last edited by: Denilson Pegaia at: 10/15/2015 12:39:55 PMDenilson Pegaia |
|
This contribution was helpful to1 thankful Users |
Follow us on