10/1/2015 8:22 PM | |
Joined: 9/23/2005 Last visit: 6/17/2024 Posts: 4346 Rating: (1434) |
“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 a button, information about the button and its parents (e.g. picture) are showed on GSC Diagnostic object. As second option, a similar button could be act by a Picture Window.
Read objects properties (e.g. position) could useful for many proposes, for example dynamic positioning of Picture Windows, related to its call buttons.
Requirements: WinCC V7.3.
Project with a minimum configuration (stop button, tags, etc. See reference “WinCC V7.3 – Simple Sample: printing data for script diagnostics (GSC), https://support.industry.siemens.com/tf/br/en/posts/135049/).
Configuration main steps:
Sub OnClick(Byval Item)
Dim aaa Set aaa = ScreenItems.Item("Button_20")
HMIRuntime.Trace " ====================" HMIRuntime.Trace vbNewLine
HMIRuntime.Trace "Data relative to Buton_20 object:" & vbNewLine
HMIRuntime.Trace "name = " &aaa.ObjectName & vbNewLine HMIRuntime.Trace "top = " & aaa.Top & vbNewLine HMIRuntime.Trace "left = " & aaa.Left & vbNewLine HMIRuntime.Trace "hight = " & aaa.Height & vbNewLine HMIRuntime.Trace "width = " & aaa.Width & vbNewLine
HMIRuntime.Trace vbNewLine
HMIRuntime.Trace "Data relative to Buton_20 Parent object:" & vbNewLine
HMIRuntime.Trace "Name = " &aaa.Parent.ObjectName & vbNewLine HMIRuntime.Trace "top = " & aaa.Top & vbNewLine HMIRuntime.Trace "left = " & aaa.Left & vbNewLine HMIRuntime.Trace "hight = " & aaa.Parent.Height & vbNewLine HMIRuntime.Trace "width = " & aaa.Parent.Width & vbNewLine
HMIRuntime.Trace vbNewLine
HMIRuntime.Trace "Data relative to Buton_20 Parent Parent object:" & vbNewLine
HMIRuntime.Trace "Name = " &aaa.Parent.Parent.ObjectName & vbNewLine HMIRuntime.Trace "hight = " & aaa.Parent.Parent.Height & vbNewLine HMIRuntime.Trace "width = " & aaa.Parent.Parent.Width & vbNewLine
HMIRuntime.Trace vbNewLine
HMIRuntime.Trace vbNewLine
HMIRuntime.Trace "Data relative to Buton_20 Parent Parent Parent object:" & vbNewLine
HMIRuntime.Trace "Name = " &aaa.Parent.Parent.Parent.ObjectName & vbNewLine HMIRuntime.Trace "hight = " & aaa.Parent.Parent.Parent.Height & vbNewLine HMIRuntime.Trace "width = " & aaa.Parent.Parent.Parent.Width & vbNewLine
HMIRuntime.Trace vbNewLine
HMIRuntime.Trace " ====================" HMIRuntime.Trace vbNewLine End Sub
Sub OnClick(ByVal item)
Dim aaa Set aaa = ScreenItems.Item("Button_2") HMIRuntime.Trace " ====================" HMIRuntime.Trace vbNewLine
HMIRuntime.Trace "Data relative to Buton_2 object:" & vbNewLine
HMIRuntime.Trace "name = " &aaa.ObjectName & vbNewLine HMIRuntime.Trace "top = " & aaa.Top & vbNewLine HMIRuntime.Trace "left = " & aaa.Left & vbNewLine HMIRuntime.Trace "hight = " & aaa.Height & vbNewLine HMIRuntime.Trace "width = " & aaa.Width & vbNewLine
HMIRuntime.Trace vbNewLine
HMIRuntime.Trace "Data relative to Buton_2 Parent object:" & vbNewLine
HMIRuntime.Trace "Name = " &aaa.Parent.ObjectName & vbNewLine HMIRuntime.Trace "hight = " & aaa.Parent.Height & vbNewLine HMIRuntime.Trace "width = " & aaa.Parent.Width & vbNewLine
HMIRuntime.Trace vbNewLine HMIRuntime.Trace " ====================" HMIRuntime.Trace vbNewLine
End Sub
References: Portal SIMATIC WinCC in Online Support https://support.industry.siemens.com/cs/br/pt/view/93906404/en
Manual WinCC V7.3: Working with WinCC https://support.industry.siemens.com/cs/ww/en/view/102754925
WinCC V7.3 Scripting: VBS, ANSI-C, VBA https://support.industry.siemens.com/cs/ww/en/view/102777678
Application and tools Demo projects for SIMATIC WinCC V7.3 https://support.industry.siemens.com/cs/br/pt/view/93148272/en
Example Blocks for WinCC V7 and STEP 7 V5 (for S7-300 with SCL and S7-400 with CFC, SCL) https://support.industry.siemens.com/cs/br/pt/view/68679830/en
Example blocks for WinCC V7 and STEP 7 (TIA Portal) (for S7-1200 and S7-1500 in SCL) https://support.industry.siemens.com/cs/br/pt/view/31624179/en
Project: Due a size / format restrictions, the project are first compacted with 7z format (project.z7) and after that attached to a zip archive (data.zip).
AttachmentData.zip (201 Downloads) |
Last edited by: Denilson Pegaia at: 10/1/2015 8:24:28 PMDenilson Pegaia |
|
Follow us on