10/3/2015 12:04 PM | |
Joined: 9/23/2005 Last visit: 12/26/2024 Posts: 4376 Rating: (1458)
|
“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:
The recipe view object has buttons to export / import archives.
In this simple sample, it is possible import / export recipes (one specific data record or all) from / to an archive by an external button click.
Requirements: WinCC Professional V13 SP1.
Project with a minimum configuration (stop button, tags, recipes, etc. - See “WinCC Professional V13 SP1 – Simple Sample: Recipes” https://support.industry.siemens.com/tf/br/en/posts/135158/).
Configuration main steps:
Open Recipe View Import Dialog
Sub OnClick(ByVal item)
Dim aaa Set aaa = ScreenItems("Recipe view_1")
aaa.ServerImport End Sub
Open Recipe View Export Dialog
Sub OnClick(ByVal item)
Dim aaa Set aaa = ScreenItems("Recipe view_1")
aaa.ServerExport End Sub
Open Recipe View Export detailed Dialog
Sub OnClick(ByVal item)
Dim aaa Set aaa = ScreenItems("Recipe view_1")
aaa.ExportShowDialog = True aaa.ExportDirectoryChangeable = True aaa.ExportFilenameChangeable = True
aaa.Export End Sub
Export data with predefined parameters
Sub OnClick(ByVal item)
Dim aaa Set aaa = ScreenItems("Recipe view_1")
aaa.ExportDirectoryChangeable = False aaa.ExportDirectoryname = "C:\test" aaa.ExportFileExtension = "CSV" aaa.ExportFilename = "aaa" aaa.ExportFilenameChangeable = False aaa.ExportSelection = 0 'all 'aaa.ExportSelection = 1 'selection aaa.ExportShowDialog = False
aaa.Export End Sub
Export data configured by variables
Sub OnClick(ByVal item)
Dim aaa Dim bbb Dim ccc
Set aaa = ScreenItems("Recipe view_1")
bbb = CStr(SmartTags("HMI_Directory"))
ccc = CStr(SmartTags("HMI_File_name"))
aaa.ExportDirectoryChangeable = False aaa.ExportDirectoryname = bbb aaa.ExportFileExtension = "CSV" aaa.ExportFilename = ccc aaa.ExportFilenameChangeable = False aaa.ExportSelection = 0 'all 'aaa.ExportSelection = 1 'selection aaa.ExportShowDialog = False
aaa.Export 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: Attached as project.zip.
AttachmentProject.zip (478 Downloads) |
Denilson Pegaia |
|
This contribution was helpful to3 thankful Users |
Follow us on