10/2/2015 8:44 PM | |
Joined: 9/23/2005 Last visit: 11/4/2024 Posts: 4351 Rating: (1451)
|
“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 with mathematicals / conversions manipulation.
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 Dim TagName index = SmartTags("HMI_Tag_5") TagName = "HMI_Tag_" & (index + 1) SmartTags(TagName)=999
End Sub
Notes: in this script the target tag name (HMI_Tag_1, HMI_Tag_2, HMI_Tag_3) is build from a index ("HMI_Tag_5"), by mathematical and data type manipulation.
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 (212 Downloads) |
Denilson Pegaia |
|
This contribution was helpful to1 thankful Users |
Follow us on