10/2/2015 12:11 PM | |
Joined: 9/23/2005 Last visit: 4/21/2025 Posts: 4406 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:
By clicking on button (or filling a IO field) alarms near a specific date / time are showed in the Alarm view object.
Requirements: WinCC Advanced V13 SP1.
Project with a minimum discrete alarm configuration (stop - See reference WinCC Advanced V13 SP1 – Simple Sample: Discrete Alarm,https://support.industry.siemens.com/tf/br/en/posts/135059/).
Configuration main steps:
Create a Date and Time internal variable (HMI Tags → Show all tag → <Add new> ; Name = “HMI_Tag_2”; Data type = “DateTime”.
Open a screen Configure a alarm view (properties → General → Display = “Alarm Buffer”(or Alarm log); properties ->Display → Control tag for display area = “HMI_Tag_2”) Create a IO Field (Toolbox → Elements) Connect the IO Field to “HMI_Tag_2” (Properties → General → Tag: = “HMI_Tag_2”; Display format = “Data/Time”).
Variants: The follow VB Scripts could be linked to buttons to set a preset value to “HMI_Tag_2” (offset as parameter):
As actual moment (now):
Sub VBFunction_2()
SmartTags("HMI_Tag_2").Value = Now()
End Sub
As actual moment (now) minus “offset” minutes:
Sub VBFunction_Min(ByVal offset)
SmartTags("HMI_Tag_2").Value = Now()- (offset/ 1440)
End Sub
As actual moment (now) minus “offset” hours:
Sub VBFunction_Hour(ByVal offset)
SmartTags("HMI_Tag_2").Value = Now()- (offset / 24)
End Sub
As actual moment (now) minus “offset” days:
Sub VBFunction_Day(ByVal offset)
SmartTags("HMI_Tag_2").Value = Now()- offset
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: as project.zip1 AttachmentProject1.zip (261 Downloads) |
Denilson Pegaia |
|
Follow us on