Zenon WPF Element V.8.10
Total Page:16
File Type:pdf, Size:1020Kb
zenon manual zenon WPF Element v.8.10 © 2019 Ing. Punzenberger COPA-DATA GmbH All rights reserved. Distribution and/or reproduction of this document or parts thereof in any form are permitted solely with the written permission of the company COPA-DATA. Technical data is only used for product description and are not guaranteed qualities in the legal sense. Subject to change, technical or otherwise. Contents 1 Welcome to COPA-DATA help ................................................................................................................ 5 2 WPF element ............................................................................................................................................... 5 3 Basics ............................................................................................................................................................. 6 3.1 WPF in process visualization ........................................................................................................................ 7 3.2 Referenced assemblies ................................................................................................................................... 8 3.3 Workflows ......................................................................................................................................................... 10 3.3.1 Workflow with Microsoft Expression Blend ................................................................................................ 11 3.3.2 Workflow with Adobe Illustrator .................................................................................................................... 11 4 Guidelines for designers ......................................................................................................................... 12 4.1 Workflow with Microsoft Expression Blend .......................................................................................... 12 4.1.1 Create button as an XAML file with Microsoft Expression Blend ...................................................... 12 4.2 Workflow with Adobe Illustrator .............................................................................................................. 16 4.2.1 Bar graph illustration ........................................................................................................................................... 16 4.2.2 WPF export .............................................................................................................................................................. 18 4.2.3 Animation in Blend ............................................................................................................................................... 20 5 Guidelines for developers ...................................................................................................................... 24 5.1 Creation of a simple WPF user control with code behind function ............................................ 24 5.2 Debugging the WPF user control in the Runtime ............................................................................. 29 5.3 Data exchange between zenon and WPF user controls .................................................................. 34 5.3.1 Data exchange using dependency properties .......................................................................................... 34 5.3.2 Data replacement via VSTA .............................................................................................................................. 38 5.4 Access to the zenon (Runtime) object model from a WPF user control ................................... 39 5.4.1 Access via VSTA "variable link" ........................................................................................................................ 39 5.4.2 Access via marshaling ......................................................................................................................................... 44 6 Engineering in zenon ............................................................................................................................... 47 6.1 CDWPF files (collective files) ...................................................................................................................... 48 6.2 create WPF element ...................................................................................................................................... 49 6.3 Configuration of the linking ....................................................................................................................... 49 6.3.1 Properties ................................................................................................................................................................. 51 6.3.2 Events ........................................................................................................................................................................ 58 6.3.3 Transformation ...................................................................................................................................................... 59 6.4 Validity of XAML Files ................................................................................................................................... 62 6.5 Pre-built elements .......................................................................................................................................... 63 6.5.1 Analog clock - AnalogClockControl .............................................................................................................. 64 6.5.2 Bar graph vertical - VerticalBargraphControl ............................................................................................ 65 6.5.3 Progress bar - ProgressBarControl ................................................................................................................ 66 6.5.4 COMTRADE-Viewer.............................................................................................................................................. 66 6.5.5 Energy class diagram........................................................................................................................................... 78 6.5.6 Pareto diagram ...................................................................................................................................................... 79 6.5.7 Circular gauge control ........................................................................................................................................ 82 6.5.8 Sankey Diagram .................................................................................................................................................... 86 6.5.9 Temperature indicator - TemperatureIndicatorControl ........................................................................ 87 6.5.10 Universal slider - UniversalReglerControl ................................................................................................... 88 6.5.11 Waterfall chart ........................................................................................................................................................ 90 6.5.12 BACnet WPF Control ........................................................................................................................................... 92 6.6 Display of WPF elements in the zenon web client.......................................................................... 107 6.6.1 Engineering in the zenon Editor ................................................................................................................... 108 6.6.2 VSTA code (complex) ........................................................................................................................................ 108 6.6.3 VSTA code (simplified) ...................................................................................................................................... 110 6.7 Examples: Integration of WPF in zenon .............................................................................................. 111 6.7.1 Integrate bar graph as WPF XAML in zenon ............................................................................................ 111 6.7.2 Integrate button as WPF XAML in zenon .................................................................................................. 115 6.7.3 Integrate DataGrid Control in zenon .......................................................................................................... 121 6.8 Error handling ............................................................................................................................................... 128 Welcome to COPA-DATA help 1 Welcome to COPA-DATA help ZENON VIDEO-TUTORIALS You can find practical examples for project configuration with zenon in our YouTube channel (https://www.copadata.com/tutorial_menu). The tutorials are grouped according to topics and give an initial insight into working with different zenon modules. All tutorials are available in English. GENERAL HELP If you cannot find any information you require in this help chapter or can think of anything that you would like added, please send an email to [email protected]. PROJECT SUPPORT You can receive support for any real project you may have from our Support Team, who you can contact via email at [email protected]. LICENSES AND MODULES If you find that you need other