10/2/2015 8:05 PM | |
Joined: 9/23/2005 Last visit: 1/17/2025 Posts: 4394 Rating: (1463)
|
“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:
In this simple sample it is demonstrated how a button could execute different actions depending of a external reference by using of VB scripting and “if else” instructions.
Depending of a HMI variable ("HMI_Tag_5") by clicking a button different HMI variables ( HMI_Tag_1, HMI_Tag_2, HMI_Tag_3) will be set to 999.
Requirements: WinCC Advanced V13 SP1.
Project with a minimum configuration (stop button, tags, etc. See references “WinCC Comfort V13 SP1 – Simple Sample: Tag multiplexing” https://support.industry.siemens.com/tf/br/en/posts/135139/ ).
Configuration main steps:
Sub VBFunction_1()
Dim index index = SmartTags("HMI_Tag_5")
If index = 0 Then SmartTags("HMI_Tag_1")=999 End If
If index = 1 Then SmartTags("HMI_Tag_2")=999 End If
If index = 2 Then SmartTags("HMI_Tag_3")=999 End If 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
Application and tools Demo projects for HMI operator panels under WinCC V13 (TIA Portal) for Basic Panels (2nd generation) and Comfort Panels https://support.industry.siemens.com/cs/br/pt/view/96003274/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
Project: The project is available as project1.zip.
AttachmentProject1.zip (210 Downloads) |
Denilson Pegaia |
|
Follow us on