(3)| 10/2/2015 12:18 PM | |
|
Joined: 9/23/2005 Last visit: 12/22/2025 Posts: 4433 Rating:
|
“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 V7.3.
Project with a minimum configuration (stop button See references “WinCC V7.3 – Simple Sample: Discrete Alarm” https://support.industry.siemens.com/tf/br/en/posts/135060/).
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: Portal SIMATIC WinCC in Online Support https://support.industry.siemens.com/cs/br/pt/view/93906404/en
Manual WinCC V7.3: Working with WinCC https://support.industry.siemens.com/cs/ww/en/view/102754925
WinCC V7.3 Scripting: VBS, ANSI-C, VBA https://support.industry.siemens.com/cs/ww/en/view/102777678
Application and tools Demo projects for SIMATIC WinCC V7.3 https://support.industry.siemens.com/cs/br/pt/view/93148272/en
Example Blocks for WinCC V7 and STEP 7 V5 (for S7-300 with SCL and S7-400 with CFC, SCL) https://support.industry.siemens.com/cs/br/pt/view/68679830/en
Example blocks for WinCC V7 and STEP 7 (TIA Portal) (for S7-1200 and S7-1500 in SCL) https://support.industry.siemens.com/cs/br/pt/view/31624179/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
Project: Due a size / format restrictions, the project are first compacted with 7z format (project.z7) and after that attached to zip archives (data1.zip...).
Attachmentdata1.zip (703 Downloads) |
|
Denilson Pegaia |
|
This contribution was helpful to
|
|
| 10/2/2015 12:20 PM | |
|
Joined: 9/23/2005 Last visit: 12/22/2025 Posts: 4433 Rating:
|
data2
Attachmentdata2.zip (710 Downloads) |
|
Denilson Pegaia |
|
| 10/2/2015 12:20 PM | |
|
Joined: 9/23/2005 Last visit: 12/22/2025 Posts: 4433 Rating:
|
data3
Attachmentdata3.zip (597 Downloads) |
|
Denilson Pegaia |
|
| 10/2/2015 12:21 PM | |
|
Joined: 9/23/2005 Last visit: 12/22/2025 Posts: 4433 Rating:
|
data4
Attachmentdata4.zip (688 Downloads) |
|
Denilson Pegaia |
|
Follow us on