Zenon Manual Controls
Total Page:16
File Type:pdf, Size:1020Kb
zenon manual Controls v.7.11 ©2014 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. The technical data contained herein has been provided solely for informational purposes and is not legally binding. Subject to change, technical or otherwise. Contents 1. Welcome to COPA-DATA help ...................................................................................................... 5 2. Controls ...................................................................................................................................... 5 3. General ....................................................................................................................................... 6 3.1 Access zenon API ......................................................................................................................................... 6 3.2 Methods ...................................................................................................................................................... 8 3.2.1 CanUseVariables ........................................................................................................................... 8 3.2.2 MaxVariables ................................................................................................................................ 9 3.2.3 VariableTypes ............................................................................................................................... 9 3.2.4 zenonExit .................................................................................................................................... 10 3.2.5 zenonExitEd ................................................................................................................................ 10 3.2.6 zenonInit ..................................................................................................................................... 10 3.2.7 zenonInitEd ................................................................................................................................. 11 4. ActiveX ...................................................................................................................................... 11 4.1 Develop ActiveX elements ........................................................................................................................ 12 4.1.1 Methods ..................................................................................................................................... 12 4.2 Example LatchedSwitch (C++) ................................................................................................................... 15 4.2.1 Interface ..................................................................................................................................... 15 4.2.2 Control ........................................................................................................................................ 16 4.2.3 Methods ..................................................................................................................................... 19 4.2.4 Operate and display ................................................................................................................... 21 4.2.5 zenon Interface........................................................................................................................... 24 4.3 Example CD_SliderCtrl (C++) ..................................................................................................................... 24 4.3.1 Interface ..................................................................................................................................... 24 4.3.2 Control ........................................................................................................................................ 25 4.3.3 Methods ..................................................................................................................................... 27 4.3.4 Operate and display ................................................................................................................... 30 4.3.5 zenon Interface........................................................................................................................... 32 4.4 Example :NET control as ActiveX (C#) ....................................................................................................... 32 4.4.1 Creat Windows Form Control ..................................................................................................... 32 4.4.2 Change .NET User Control to dual control ................................................................................. 36 3 4.4.3 Work via VBA with ActiveX in the Editor .................................................................................... 41 4.4.4 Connect zenon variables with the .NET user control ................................................................. 42 5. .NET user controls ...................................................................................................................... 46 5.1 Different use .NET Control in Control Container or ActiveX ..................................................................... 47 5.2 Example .NET control container................................................................................................................ 47 5.2.1 General ....................................................................................................................................... 47 5.2.2 Create .NET user control ............................................................................................................ 50 5.2.3 add a CD_DotNetControlContainer and a .NET User Control .................................................... 59 5.2.4 Accessing the user control via VSTA or VBA ............................................................................... 64 5.3 Example :NET control as ActiveX (C#) ....................................................................................................... 68 5.3.1 Creat Windows Form Control ..................................................................................................... 68 5.3.2 Change .NET User Control to dual control ................................................................................. 71 5.3.3 Work via VBA with ActiveX in the Editor .................................................................................... 76 5.3.4 Connect zenon variables with the .NET user control ................................................................. 77 6. WPF Element ............................................................................................................................. 81 6.1 Basics ......................................................................................................................................................... 82 6.1.1 WPF in process visualization ...................................................................................................... 82 6.1.2 Transfer of values from zenon to WPF ....................................................................................... 84 6.1.3 Referenced objects ..................................................................................................................... 85 6.1.4 Allocation of zenon object to WPF content ................................................................................ 86 6.1.5 Workflows .................................................................................................................................. 87 6.2 Manual for designer .................................................................................................................................. 88 6.2.1 Workflow with Microsoft Expression Blend ............................................................................... 89 6.2.2 Workflow with Adobe Illustrator ................................................................................................ 93 6.3 Engineering in zenon ............................................................................................................................... 101 6.3.1 create WPF element ................................................................................................................. 102 6.3.2 CDWPF files (collective files) .................................................................................................... 103 6.3.3 Configuration of the linking ...................................................................................................... 104 6.3.4 Validity of XAML Files ............................................................................................................... 118 6.3.5 Pre-built elements .................................................................................................................... 120 6.3.6 Examples: Integration of WPF in zenon ................................................................................... 133 6.3.7 Troubleshooting ....................................................................................................................... 155 4 Welcome to COPA-DATA help 1. Welcome to COPA-DATA help GENERAL HELP If you cannot find any information you require in this help chapter or can think of anything that you would like added,