10/3/2015 11:53 AM | |
Joined: 9/23/2005 Last visit: 10/10/2024 Posts: 4349 Rating: (1446)
|
“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:
Recipes could contain many data records. To increase the usability of the Recipe view, it is possible to build filters, so shows just a subset of the recipe contends. The filters could be set by the object properties offline or online. Alternatively it is possible to set filters by scripting In this simple sample, it is possible to filter recipes contends, with filter implemented by VB Scripting (buttons).
Requirements: WinCC Professional V13 SP1.
Project with a minimum configuration (stop button, tags, recipes, etc. - this example was based in the simple sample “ WinCC Professional V13 SP1 – Simple Sample: Recipes” - https://support.industry.siemens.com/tf/br/en/posts/135158/ ).
Configuration main steps: As start point, it was created a recipe with the respective elements, referenced controller tags e data records:
Place a button on the screen and configure the follow VB scripts for the event click:
Sub OnClick(ByVal item)
Dim aaa Set aaa = ScreenItems("Recipe view_1")
MsgBox (aaa.FilterSQL)
End Sub
Sub OnClick(ByVal item)
Dim aaa Set aaa = ScreenItems("Recipe view_1")
aaa.FilterSQL = ""
End Sub
Sub OnClick(ByVal item)
Dim aaa Set aaa = ScreenItems("Recipe view_1")
aaa.FilterSQL = "Recipe_element_1 > 10"
End Sub
To set the filter to show the Data Records where Filter Recipe_element_1 = 1 OR Recipe_element_1 =11
Sub OnClick(ByVal item)
Dim aaa Set aaa = ScreenItems("Recipe view_1")
aaa.FilterSQL = "Recipe_element_1 = 1 OR Recipe_element_1 = 11"
End Sub
Sub OnClick(ByVal item)
Dim aaa Set aaa = ScreenItems("Recipe view_1")
aaa.FilterSQL = SmartTags("HMI_Tag_Recipe_Filter")
End Sub
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 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
Help → Visualize processes → Working with recipes → Examples (Basic Panels, Panels, RT Advanced)
Project: Due a size / format restrictions, the project are available as project.zip.
AttachmentProject.zip (406 Downloads) |
Denilson Pegaia |
|
Follow us on