10/2/2015 6:46 PM | |
Joined: 9/23/2005 Last visit: 1/2/2025 Posts: 4381 Rating: (1459)
|
“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:
VB script has the feature to show messages and get feedback (e.g. yes / no) in a simple way.
In this simple sample the message box are used in two ways: 1 – Show a simple user message. 2 – Get a feedback (confirmation) before invert a binary tag.
Requirements: WinCC Professional V13 SP1.
Project with a minimum configuration (stop button, tags, etc.).
Configuration main steps: 1 – Show a simple user message.
Sub OnClick(ByVal item)
MsgBox("That is a VB Message Box")
End Sub
2 – Get a feedback (confirmation) before invert a binary tag.
Sub OnClick(ByVal item)
Dim aaa aaa = MsgBox("Do you really want to invert this bit?",vbYesNo,"Confirmation") If aaa = vbYes Then SmartTags("HMI_Tag_1").Value = 1 - SmartTags("HMI_Tag_1").Value 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
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: Due a size / format restrictions, the project is attached as zip archive (data.zip).
AttachmentData.zip (337 Downloads) |
Denilson Pegaia |
|
This contribution was helpful to1 thankful Users |
Follow us on