QuickOPC-UA 1.00 Concepts - Software Toolbox

2y ago
38 Views
4 Downloads
1.30 MB
54 Pages
Last View : 2d ago
Last Download : 2m ago
Upload by : Abby Duckworth
Transcription

CODE Consulting and Development, s.r.o.Bolevecka naves 27, 323 00 Plzen, Czech Republice-mail: sales09@opclabs.com, Web: www.opclabs.comtel. 420 603 214 412, fax 420 378 600 795QuickOPC-UA 1.00 ConceptsConcepts-QuickOPC-UA 1.00.docx; 12/6/2011Page 1 of 54

CODE Consulting and Development, s.r.o.Bolevecka naves 27, 323 00 Plzen, Czech Republice-mail: sales09@opclabs.com, Web: www.opclabs.comtel. 420 603 214 412, fax 420 378 600 795ContentsIntroduction .5Installation .6Operating Systems. 6Prerequisites. 7Licensing . 7Related Products . 8Product Parts .9Assemblies . 9XML Comments . 9Demo Application . 10OPC UA Sample Server . 10License Manager. 10Documentation and Help . 11Fundamentals . 12Typical Usage . 12Thick-client applications on LAN, WAN or Internet . 12Web applications (server side) . 13Referencing the Assemblies . 14Namespaces . 15Naming Conventions . 16Components and Objects . 16Computational Objects . 16Default Instance . 18User Interface Objects . 18Stateless Approach . 18Simultaneous Operations . 19Error Handling . 20Errors and Multiple-Element Operations . 21Errors in Subscriptions . 21Helper Types . 22Time Periods . 22OPC Status Code . 22OPC Attribute Data . 23Result Objects . 23Element Objects . 24Descriptor Objects . 24Concepts-QuickOPC-UA 1.00.docx; 12/6/2011Page 2 of 54

CODE Consulting and Development, s.r.o.Bolevecka naves 27, 323 00 Plzen, Czech Republice-mail: sales09@opclabs.com, Web: www.opclabs.comtel. 420 603 214 412, fax 420 378 600 795Parameter Objects . 25Identifying Information in OPC-UA. 25Server Endpoints . 25Node IDs . 26Attribute IDs . 27Index Range Lists. 27OPC-UA Security . 28Security in Endpoint Selection . 29Trusting Server Instance Certificate . 29Providing Client Instance Certificate. 30Data Access Tasks . 32Obtaining Information . 32Reading Attributes of OPC Nodes . 32Modifying Information . 33Writing Attributes of OPC Nodes . 33Browsing for Information . 34Discovering OPC Servers . 34Browsing for OPC Nodes . 35Subscribing for Information. 36Subscribing to Monitored Items . 36Changing Existing Subscription . 38Unsubscribing from Monitored Items . 38Obtaining Subscription Information . 39Monitored Item Changed Event or Callback . 39Using Callback Methods Instead of Event Handlers . 40Setting Parameters . 41Application Deployment . 43Deployment Elements . 43Assemblies . 43Prerequisites . 43Licensing. 44Deployment Methods . 44Manual Deployment . 44Automated Deployment . 44Advanced Topics . 46OPC Specifications . 46OPC “Classic” . 46OPC Interoperability . 46Application Configuration . 47Concepts-QuickOPC-UA 1.00.docx; 12/6/2011Page 3 of 54

CODE Consulting and Development, s.r.o.Bolevecka naves 27, 323 00 Plzen, Czech Republice-mail: sales09@opclabs.com, Web: www.opclabs.comtel. 420 603 214 412, fax 420 378 600 795Internal Optimizations . 48Failure Recovery . 49Timeout Handling . 50Data Types . 50Multithreading and Synchronization . 5164-bit Platforms . 52Classic OPC on 64-bit Systems . 52Version Isolation . 53Additional Resources . 54Concepts-QuickOPC-UA 1.00.docx; 12/6/2011Page 4 of 54

CODE Consulting and Development, s.r.o.Bolevecka naves 27, 323 00 Plzen, Czech Republice-mail: sales09@opclabs.com, Web: www.opclabs.comtel. 420 603 214 412, fax 420 378 600 795IntroductionAre you having difficulties incorporating the OPC data into your solution? Need to do itquickly and in quality? If so, QuickOPC comes to the rescue.QuickOPC is a radically new approach to access OPC data. Traditionally, OPCprogramming required complicated code, even with use of OPC Foundation SDKs. OPCserver endpoints must be discovered, connections to OPC Servers must be instantiated,OPC subscriptions must be created and manipulated, and OPC Monitored Items must beadded and managed properly. Too many lines of error-prone code must be written toachieve a simple goal – reading or writing a value, or subscribing to value changes.QuickOPC is a set of components that simplify the task of integrating OPC intoapplications. Reading a value from OPC Unified Architecture server, writing a data value,or subscribing to data changes can be achieved in just one line of code!The components can be used from various languages and environments. The availableexamples show how the components can be used from C#, Visual Basic.NET, andmanaged C . Windows Forms, ASP.NET pages, console applications, and WPFapplications are all supported.The development tools we have targeted primarily are Microsoft Visual Studio 2008 andMicrosoft Visual Studio 2010.Concepts-QuickOPC-UA 1.00.docx; 12/6/2011Page 5 of 54

CODE Consulting and Development, s.r.o.Bolevecka naves 27, 323 00 Plzen, Czech Republice-mail: sales09@opclabs.com, Web: www.opclabs.comtel. 420 603 214 412, fax 420 378 600 795InstallationThe installation can be started by running the setup program. Just follow the on-screeninstructions. The installation program requires that you have administrative privileges tothe system.After an introductory screen and a selection of install folder, the setup wizard offers youthe choice of installation components:When the installation is finished, it opens the Quick Start document. You can access thedocumentation and various tools from your Start menu.The product includes an uninstall utility and registers itself as an installed application. Itcan therefore be removed easily from Control Panel. Alternatively, you can also use theUninstall icon located in the product’s group in the Start menu.Operating SystemsThe product is supported on following operating systems: Microsoft Windows XP with Service Pack 2 or later (x86)Concepts-QuickOPC-UA 1.00.docx; 12/6/2011Page 6 of 54

CODE Consulting and Development, s.r.o.Bolevecka naves 27, 323 00 Plzen, Czech Republice-mail: sales09@opclabs.com, Web: www.opclabs.comtel. 420 603 214 412, fax 420 378 600 795 Microsoft Windows Vista with Service Pack 1 or later (x86 or x64)Microsoft Windows 7 (x86 or x64)Microsoft Windows Server 2003 with Service Pack 1 or later (x86 or x64)Microsoft Windows Server 2008 (x86 or x64)Microsoft Windows Server 2008 R2 (x64), optionally with Service Pack 1On x64 platforms, QuickOPC-UA can run in 32-bit or 64-bit mode.PrerequisitesFor QuickOPC-UA, the following software must be present on the target system beforethe installation:1. Microsoft .NET Framework 3.5 with Service Pack 1 (Full or Client Profile), orMicrosoft .NET Framework 4 (Full or Client Profile).The Client Profile of the .NET Framework is enough for QuickOPC-UA itself;however in some scenarios you will need the Full profile, such as when you aredeveloping ASP.NET applications, or want to run the ASP.NET examples includedwith the product.2. Adobe (Acrobat) Reader or compatible PDF viewer.The QuickOPC-UA setup program also installs following software on the target system,when needed for the selected set of installation components:1.2.3.4.OPC UA SDK 1.01 Redistributables.OPC UA Local Discovery Server 1.01.OPC UA SDK 1.01 COM Interop Components Redistributables.OPC UA SDK 1.01 Test Applications Setup.LicensingQuickOPC is a licensed product. You must obtain a license to use it in development orproduction environment. For evaluation purposes, you are granted a trial license, whichis in effect if no other license is available.With the trial license, the components only provide valid OPC data for 30 minutes sincethe application was started. After this period elapses, performing OPC operations willreturn an error. Restarting the application gives you additional 30 minutes, and so on. Ifyou need to evaluate the product but the default trial license is not sufficient for youConcepts-QuickOPC-UA 1.00.docx; 12/6/2011Page 7 of 54

CODE Consulting and Development, s.r.o.Bolevecka naves 27, 323 00 Plzen, Czech Republice-mail: sales09@opclabs.com, Web: www.opclabs.comtel. 420 603 214 412, fax 420 378 600 795purposes, please contact the vendor or producer, describe your needs, and a special triallicense may be provided to you.The licenses are installed and managed using a License Manager utility, described furtherin this document.Related ProductsAdditional products exist to complement the base QuickOPC-UA offering. Check theoptions available with your vendor.Concepts-QuickOPC-UA 1.00.docx; 12/6/2011Page 8 of 54

CODE Consulting and Development, s.r.o.Bolevecka naves 27, 323 00 Plzen, Czech Republice-mail: sales09@opclabs.com, Web: www.opclabs.comtel. 420 603 214 412, fax 420 378 600 795Product PartsAssembliesAt the core of QuickOPC-UA there are .NET assemblies that contain reusable librarycode. You reference these assemblies from the code of your application, and byinstantiating objects from those assemblies and calling methods on them, you gain theOPC functionality.The assembly files are installed into a subdirectory called Assemblies under theinstallation directory of the product. For easy recognition among other assemblies whenused in a larger context, all assemblies start with “OpcLabs.” prefix.Following assemblies are part of QuickOPC-UA:Assembly seLib.dllOpcLabs.EasyOpcUA.dllTitleOPC Labs Base LibraryEasyOPC-UA Library(varies; not Server.dll(varies; not relevant)DescriptionSupporting codeContains classesthat facilitate easywork with OPCUnifiedArchitecture.Supporting codeQuickOPC-UA components were consciously written to target Microsoft .NET Framework3.5, i.e. they do not depend on features available only in the later version of theframework. As such, you can use the components in applications targeting version 3.5 or4.0 of the Microsoft .NET Framework.For the curious, QuickOPC-UA has been developed in Microsoft Visual Studio 2010.XML CommentsTogether with the .DLL files of the assemblies, there are also .XML files that contain XMLcomments for them. The texts contained in these files are used by various tools toprovide features such as IntelliSense and Object Browser information in Visual Studio.Concepts-QuickOPC-UA 1.00.docx; 12/6/2011Page 9 of 54

CODE Consulting and Development, s.r.o.Bolevecka naves 27, 323 00 Plzen, Czech Republice-mail: sales09@opclabs.com, Web: www.opclabs.comtel. 420 603 214 412, fax 420 378 600 795Demo ApplicationQuickOPC-UA installs with a demo application that allows exploring various functions ofthe product. The demo application is available from the Start menu.OPC UA Sample ServerTo demonstrate capabilities of QuickOPC, some OPC server is needed. The demoapplication installed with the product, and most examples use an OPC UA Sample Server(from OPC Foundation) that is installed together with QuickOPC. The server can beaccessed on “opc.tcp://localhost:51210/UA/SampleServer” or“http://localhost:51211/UA/SampleServer” (these are so-called Discovery URIs).The demo application and the examples are designed to connect to the OPC UA SampleServer in its default configuration (i.e. as shipped). In fact, some very simple examplesconnect to just one OPC node. For example, a dynamically changing double-precisionvalue has node Id "nsu http://test.org/UA/Data/;i 10854". You can either call thebrowsing methods to obtain other node Ids together with their descriptions, or you cansimply borrow the node Ids used in our examples. There are various other OPC nodes inthis server that you can use in your own experiments too.License ManagerThe License Manager is a utility that allows you to install, view and uninstall licenses.Concepts-QuickOPC-UA 1.00.docx; 12/6/2011Page 10 of 54

CODE Consulting and Development, s.r.o.Bolevecka naves 27, 323 00 Plzen, Czech Republice-mail: sales09@opclabs.com, Web: www.opclabs.comtel. 420 603 214 412, fax 420 378 600 795In order to install a license, invoke the License Manager application (from the Startmenu), and press the Install license button. Then, point the standard Open File dialog tothe license file (with .BIN) extension provided to you by your vendor.Note: You need administrative privileges to successfully install and uninstall licenses.Documentation and HelpThe documentation consists of following parts:-Concepts (this document).Quick Start. Short step-by-step instructions to create your first project.Reference. The reference documentation is in .CHM format (Microsoft HTMLHelp), and formatted according to Visual Studio style and standards.What’s New. Contains information about changes made in this and earlierversions.Bonus Material document.Examples document.You can access all the above mentioned documentation from the Start menu.In addition, there is IntelliSense and Object Browser information available from VisualStudio environment.The QuickOPC-UA help content integrates with Microsoft Visual Studio 2008 Help(Microsoft Help 2 format) and Microsoft Visual Studio 2010 Help (Microsoft HelpViewer 1.0 format).Concepts-QuickOPC-UA 1.00.docx; 12/6/2011Page 11 of 54

CODE Consulting and Development, s.r.o.Bolevecka naves 27, 323 00 Plzen, Czech Republice-mail: sales09@opclabs.com, Web: www.opclabs.comtel. 420 603 214 412, fax 420 378 600 795FundamentalsThis chapter describes the fundamental concepts used within QuickOPC component.Please read it through, as the knowledge of Fundamentals is assumed in later parts ofthis document.Typical UsageQuickOPC-UA is suitable for use from within any tool or language based on Microsoft.NET framework. There are many different scenarios for it, but some are more common.Thick-client applications on LAN, WAN or InternetThe most typical use of QuickOPC-UA involves a thick-client user application written inone of the Microsoft .NET languages. This application uses the types from QuickOPC-UAobject model, and accesses data within OPC servers that are located on remotecomputers on the same LAN (Local Area Network) or on WAN (Wide Area Network) oron Internet. The communication with the target OPC server is performed by means ofWeb Services.Concepts-QuickOPC-UA 1.00.docx; 12/6/2011Page 12 of 54

CODE Consulting and Development, s.r.o.Bolevecka naves 27, 323 00 Plzen, Czech Republice-mail: sales09@opclabs.com, Web: www.opclabs.comtel. 420 603 214 412, fax 420 378 600 795The following picture shows how the individual pieces work together:Web applications (server side)The other typical use of QuickOPC-UA is to place it on the Web server inside a Webapplication. The Web application provides HTML pages to the client’s browser, runs in aWeb server, such as Microsoft IIS (Internet Information Server), and is written using toolsand languages such as ASP.NET (using C#, Visual Basic.NET, or other .NET language).The Web application uses the types from QuickOPC-UA object model, and accesses datawithin OPC servers that are located on remote computers on the same LAN (Local AreaNetwork). The communication with the target OPC server is performed by means of WebServices. No OPC-related (or indeed, Microsoft-related) software needs be installed onthe client machine; a plain Web browser such as Internet Explorer (IE) or Firefox issufficient.Concepts-QuickOPC-UA 1.00.docx; 12/6/2011Page 13 of 54

CODE Consulting and Development, s.r.o.Bolevecka naves 27, 323 00 Plzen, Czech Republice-mail: sales09@opclabs.com, Web: www.opclabs.comtel. 420 603 214 412, fax 420 378 600 795The following picture shows how the individual pieces work together:Referencing the AssembliesYour application first needs to reference the QuickOPC-UA assemblies in order to use thefunctionality contained in them. How this is done depends on the language and tool youare using: For Visual Basic in Visual Studio, select the project in Solution Explorer, andchoose Project - Add Reference command.For Visual C# in Visual Studio, select the project in Solution Explorer, andchoose Project - Add Reference command.For Visual C in Visual Studio, select the project in Solution Explorer, andchoose Project - References command.You are then typically presented with an “Add Reference” dialog. The QuickOPC-UAassemblies should be listed under its .NET tab. Select those that you need (see theirdescriptions in “Product Parts” chapter), and press OK.Concepts-QuickOPC-UA 1.00.docx; 12/6/2011Page 14 of 54

CODE Consulting and Development, s.r.o.Bolevecka naves 27, 323 00 Plzen, Czech Republice-mail: sales09@opclabs.com, Web: www.opclabs.comtel. 420 603 214 412, fax 420 378 600 795Your projects will need “EasyOPC-UA Library” component.If you are using the Visual Studio Toolbox (described further below) to add instances ofcomponents to your project, the assembly references are created for you by VisualStudio when you drag the component onto the designer’s surface.NamespacesThe QuickOPC-UA class library is made up of namespaces. Each namespace containstypes that you can use in your program: classes, structures, enumerations, delegates,and interfaces.All our namespaces begin with OpcLabs name. QuickOPC-UA defines types in followingnamespaces:Namespace NameOpcLabs.EasyOpcIn bs.EasyOpcUADescriptionContains classes that facilitate easy work withvarious OPC specifications (i.e. commonfunctionality that is not tied to a singlespecification such as OPC Data Access or OPCUnified Architecture).Contains classes that facilitate easy work withOPC Unified Architecture.You can use symbols contained in the namespaces by using their fully qualified name,such as OpcLabs.EasyOpc.UA.EasyUAClient. In order to save typing and achieve moreConcepts-QuickOPC-UA 1.00.docx; 12/6/2011Page 15 of 54

CODE Consulting and Development, s.r.o.Bolevecka naves 27, 323 00 Plzen, Czech Republice-mail: sales09@opclabs.com, Web: www.opclabs.comtel. 420 603 214 412, fax 420 378 600 795readable code, you will typically instruct your compiler to make the namespaces you useoften available without explicit reference. To do so: In Visual Basic, place the corresponding Imports statements at the beginningof your code files.In Visual C#, place the corresponding using directives at the beginning ofyour code files.In Visual C , place the corresponding using namespace directives at thebeginning of your code files.Naming ConventionsIn addition to being compliant with common Microsoft and .NET Frameworkrecommendations for names, QuickOPC follows certain additional naming conventions: Types which are specific to very simplified (“easy”) model for working with OPCstart with the prefix Easy.Types which are specific to OPC Unified Architecture start with UA (or EasyUA)prefix. Types that are shared among multiple OPC specifications do not havethese prefixes.Note that the second convention works in addition and together with the fact that thereis separate UA namespace for this purpose, too.Components and ObjectsQuickOPC is a library of many objects. They belong into two basic categories:Computational objects provide “plumbing” between OPC servers and your application.They are invisible to the end user. User interface objects provide OPC-related interactionbetween the user and your application.Computational ObjectsFor easy comprehension, there is just one computational object that you need to startwith: For OPC Unified Architecture, it is the EasyUAClient object. All other computationalobjects are helper objects (see further in this chapter). You achieve all OPCcomputational tasks by calling methods on one of these objects. The remainder of thisparagraph describes the use of EasyUAClient object.In order to be able to use the EasyUAClient object, you need to instantiate it first.In QuickOPC-UA, there are two methods that you can use:Concepts-QuickOPC-UA 1.00.docx; 12/6/2011Page 16 of 54

CODE Consulting and Development, s.r.o.Bolevecka naves 27, 323 00 Plzen, Czech Republice-mail: sales09@opclabs.com, Web: www.opclabs.comtel. 420 603 214 412, fax 420 378 600 795 Write the code that creates a new instance of the object, using am operator suchas New (Visual Basic), new (Visual C#) or

When the installation is finished, it opens the Quick Start document. You can access the documentation and various tools from your Start menu. . Opc.Ua.Client.dll Opc.Ua.Configuration.dll Opc.Ua.Core.dll Opc.Ua.QuickstartsLibrary.dll Opc

Related Documents:

CODE Consulting and Development, s.r.o. Bolevecka naves 27, 323 00 Plzen, Czech Republic e-mail: sales09@opclabs.com, Web: ww

§2. Concepts as a foundation for generic programming §3. The basic use of concepts as requirements on template arguments §4. The definition of concepts as Boolean values (predicates) §5. Designing with concepts §6. The use of concepts to resolve overloads §

Key Concepts in Adult Education and Training 2nd Edition This book is an accessible and jargon-free guide to the key concepts used in adult education and training. The author examines in detail forty-five of these concepts, ranging from core concepts such as educa-tion and development to more specialist concepts like social capital and social .

Chapter 4 Inter-VLAN Routing 97 Chapter 5 STP Concepts 137 Chapter 6 EtherChannel 175 Chapter 7 DHCPv4 199 Chapter 8 SLAAC and DHCPv6 223 Chapter 9 FHRP Concepts 261 Chapter 10 LAN Security Concepts 275 Chapter 11 Switch Security Configuration 313 Chapter 12 WLAN Concepts 347 Chapter 13 WLAN Configuration 397 Chapter 14 Routing Concepts 445

individual. Indeed, we find that our Twelve Concepts are the spiritual foundation for all of A.A.’s world services.” For more information about the Twelve Concepts for World Service, see “The Twelve Concepts Illustrated” (P-8); Twelve Concepts Window Shade (M-20); “The Twe

Framework and concepts The EA tool should support the relevant concepts and frame work(s) Relevant for the goal of your enterprise architecture More is less! Support of more concepts and frameworks is not necessarily better Minimally, there should be support for the Principles and guidelines Business concepts Application and information concepts

4. System Hacking 3.1 Network scanning, enumeration concepts 3.2 Scanning tools 3.3 Spidering concepts 3. Scanning, Enumeration 1.1 Information security overview 1.2 Hacking concepts 1.3 Elements of Information security 1. Introduction to Ethical Hacking 5.1 Malware concepts 5.2 Malicious programs concepts 5.3 Countermeasures 5. Malware Threats

Quand un additif alimentaire est autorisé au niveau européen, celui-ci bénéficie d'un code du type Exxx. Les additifs sont classés selon leur catégories. Cependant, étant donné le développement de la liste et son caractère ouvert, la place occupée par un additif alimentaire dans la liste n'est plus nécessairement indicative de sa fonction. Sommaire 1 Tableau des colorants .