您好,欢迎光临本网站![请登录][注册会员]  
文件名称: Programming an OPC UA .NET Client with C# for the SIMATIC NET OPC UA Server .pdf
  所属分类: 系统集成
  开发工具:
  文件大小: 3mb
  下载次数: 0
  上传时间: 2019-06-30
  提 供 者: auto****
 详细说明:面向西门子OPC SERVER进行OPC UA.NET的编程说明。Table of contents Table of contents Warranty and liabilit Automation task Overview 1.2 Requirements 2 Automation solution 2.1 Solution overview 2.2 Description of the core functionality…… 245688933 Delimitation 2.3 Hardware and software components used 13 2.4 Alternative solutions 3 Basics 3.1 Basics on opc Basics on opc unified architecture 3.2.1 OPC UA specifications 55779 3.2.2 Structure of the OPC UA Server address space 3.2.3 Interface for access to the oPc Ua server address space.....23 3.2. 4 Protocols and security mechanisms 25 3.2.5 Delimitation and comparison with oPc data access ......... 30 3.3 Basics on s communication 3.3.1 General 31 3.3.2 Optimized s7 communication 34 4 Functional Mechanisms of this Application…… 35 4.1 OPC UA Client aPl 38 4.2 Simple oPc Ua client…… 40 4.3 Comfortable opc ua client ∴43 4.3.1 User interface .43 4.3.2 Class diagram 4.3.3 Sequence diagrams…… 46 4.4 S7 program 52 5 Configuration and settings 56 5.1 Configuring the sIMATIC s7 stations 56 5.2 Configuration of the OPC server station…… 58 Configuration of the OPC UA Security 62 5.3.1 OPC UA remote communication 62 5.3.2 Certificate storage .63 5.3.3 Authentication, Security Policy and Message Security Mode 68 Installation 70 7 Commissioning the Application....... 8 Operating the Application. 8.1 Operating the simple client 76 8.2 Operating the convenient OPC UA client Further Notes, Tips Tricks, etc. 84 0 Links Literature 85 10.1 Bibliographic references…… 85 10.2 Internet link specifications 85 11 Hist 86 ET OPC UA-Client Entry|D42014088,V1.1,08/2014 1 Automation task 1. 1 Overview Automation Task Purpose With OPC Unified Architecture(UA), an additional, convenient and performant option of process coupling for PC systems with SIMATIC S7 now exists in SIMATIC NET OPC Server, which will successively replace the existing OPC Data Access(DA)and Alarms Events(A&E)functions The main advantages of OPC UA over conventional OPC interfaces are communication via the internet and across firewalls optimized robust and fault-tolerant protocol with integrated security mechanisms OPC UA can be directly integrated in applications on different operating systems with different programming languages all OPC information, such as data or alarms, is integrated in a namespace nformation can be described with object-oriented means Target audience This application is designed for end users who need a comprehensive introduction to this technology and who want to acquire experience with the professional creation of opc ua clients in ct under net Content This is where you get an overview of the use of the OPC UA communication interface which offers the data, alarms and diagnostic information from the SIMATIC S7 controllers. You will learn about the components used, standard hardware and software components and the specially created user software The user software offers examples for the creation of OPC Ua clients with C# under. NET. Included are a simplified, reusable APl, a simple example and a complex example with a convenient user interface. The example also provides notes on the optimization and expansion of the application ET OPC UA-Client Entry|D42014088,V1.1,08/2014 1 Automation task 1.1 Overview Overview Introduction To realize a data link, it is nowadays preferred to use standardized mechanisms in order to ensure that such a data exchange remains independent of the used bus system or protocol or even manufacturer. For the exchange of event and alarm messages, a standardized mechanism for connecting different subs ystems will also be used. OPC UA combines this functionality and additionally offers authentication and encrypted data transmission and advanced diagnostic information Overview of the automation problem The following figure provides an overview of the automation task Figure 1-1 PC Station Visualization Data Acquisition Diagnosis Reporting Contro Internet Information server Information server OPC unified architecture OPC unified architecture Process/production plant Process/ production plant Description of the automation task In the automation system the oPC Ua server shall be considered the information system. Due to the encrypted access, which is checked and secured withentire server, which can display and describe individual components but also the certificates a link to other locations is also possible The core task of this example is access to process data with the OPC Ua interface This is explained by creating a simple, individually created visualization on the basis of the new oPc ua standard which is nevertheless suitable for real-life situations ET OPC UA-Client Entry|D42014088,V1.1,08/2014 1 Automation task 1.2 Requirements The application is to contain the following functionalities: server selection including security settings navigation through the OPC UA namespace of the server and selection of process tags reading of attributes including the values of the selected process tags monitoring of the value of the selected process tags writing the value of the selected process tags use of block services via OPC Ua Further data processing(e. g. saving in database or similar )is not discussed here 12 Requirements Requirements of the automation task The sample application has been created in C# and uses the interfaces of. NET aPi of the oPc foundation The user is explained the handling of the OPC UA interface under NET in a real life situation the basis interface is the net client sdk of the opc foundation included in delivery on the SIMATIC NET installation This interface offers the full functional scope of OPC UA. To simplify the interface a reduction to the functionality required for this example is performed. An efficient instruction which is suitable for real-life situations for the opc ua services is developed The design of a simple GUI interface demonstrates the basic functionality of OPc UA. This shows the entire functional chain between S7 tag(s), OPC UA namespace and access from the client in c# login, logout and authentication on the server searching the namespace for tags Reading, writing and monitoring tags simple error handling The example describes the symbolic and absolute addressing and the use of the tag services "read, write and monitor for the S7 basic types as well as the use of the block-oriented services(receiving and sending of large data blocks The different diagnostics options and the processing of error scenarios by the program are explained The errors can also be triggered by simulating disconnections between the different components ET OPC UA-Client Entry|D42014088,V1.1,08/2014 1 Automation task 1.2 Requir Re It for data storage The controller is to be able to offer the necessary data structures and data volumes and simulate value changes. There is no concrete control task, only the access to the data is to be illustrated the data areas and the interaction with other components are displayed in the figure below Figure 1-2 PLC OPC Client Tags PUT Display GET OPC OPC Read Production BSEND Server Write Memory data Subscribe/ R P Receipt BREC The StEP7 program in the S7-CPU simulates the individual values which are to be received and displayed by the client (tag services). Different data types are used as individual tags The PLC program simulates and generates the necessary structures and values for the bi-directional transmission of larger data volumes and calls the block-oriented services according y(BSEND, BRECv. This is used for STRUCT or ARRAY tags with a total of several 100 bytes(recipe data, production data blocks or similar. To send data, PLC actively triggers the transmission of a block-oriented production data record to the oPc ua server the plc receives a block-oriented data set e.g. recipe) sent by an OPC Ua client and stores it in the respective structure in a data block The necessary tag tables are furthermore provided in StEP 7 for test purposes Requirement for the Pc station The Pc station must have the necessary physical connection to the respective hardware and software for the communication with the controller. the application for the visualization and control should only use the opc ua interface to be able to use any oPc Ua servers The application example is to show what has to be generally projected on the server/client pc station and the s7 controllers in order to solye the communication task In steP 7 the SIMATIC NET OPC server is configured for the task(protocol security settings, certificates, etc. ) in the configuration console for the PC station and in the respective contiguration files The underlying S7 protocol and the necessary connections to the controllers are configured, including all corresponding steps which are to be projected and configured on the server PC for the OPC UA operation Under windows a secure communication between client pc and server pc is created by oPc Ua means ET OPC UA-Client Entry|D42014088,V1.1,08/2014 2 Automation solution 2. 1 Solution overyiew Automation Solution 2.1 Solution overview Overvie The figure below shows a schematic overview of the most important components of the soluti Figure 2-1 SIMATIC PC station OPC UA Client Std. Ethernet card SIMATIC NET CD V12 advanced SOFTNET ST E/Lean STEP 7V13 Visual Studio 2010(C#) S7-1500 station S7-300 station S7-400 station CPU 1516-2 PN/DP CPU 315-2 PN/DP CPU 416-3 PN/DP CP443-1Ady Structure A PC station is connected to a cpu 315-2 Pn and a cpu 414-2 via Ethernet a standard ethernet card is used in the pc OPC-UA Client software The OPC-UA client in the Pc station is realized at two levels of complexity. A very simply designed client (Simple OPC UA Client ) shows you all basic functions for getting started in OPC UA. A more complex client(OPC UA. NET Client) with a convenient interface will demonstrate professional handling with reusable classes The functionality of these sample clients will be explained in the next section ET OPC UA-Client Entry|D42014088,V1.1,08/2014 2 Automation solution 2. 2 Description of the core functionality 2.2 Description of the core functionality Overview SIMATIC NET OPC UA Server forms the main functionality part of this example. It simplifies the functions and information of the classic oPC server for Data Access and Alarm Events in one single namespace and permits access to information via a service-oriented architecture communication via the internet and across firewalls is secure and performant This figure below shows the functional chain for a data access Figure 2-2 OPC UA Client Display OPC UA Client 3 Display Memory Internet ind Ethernet UA TCP OPC UA Server 2 S7 protocol S7 connection nd. Ethernet 3{5 BSEND S7 tags BRECV Data blocks Table 2-1 No Component Description S7 station The S7 CPU provides S7 tags for data areas such as flags or data blocks Via the block-oriented services BSEND and BRECV, larger data blocks can also be actively sent and received from the user program. OPC UA server The OPC UA server transposes the S7 tags and the block services to the OPC Ua tags and provides oPc services such as browse, read write and data monitoring OPC UA client The oPc ua client can establish a secure connection to the server, navigate through the namespace of the server and read write and monitor selected tags ET OPC UA-Client Entry|D42014088,V1.1,08/2014 2 Automation solution 2.2 Description of the core functionality Software components of the application(OPC UA. NET client) The figure below shows the software components used for the more complex application(OPC UA. NET client). The OPC UA server and the basic libraries for the opc ua communication on the client side are from the sImatic net cd The software components created in C# for the application can be divided in reusable modules and sample code Figure 2-3 Example Reusability SIMATIC NET CD Simple UA Browse Control Client Client Attribute List Control Monitored items contre OPC UA Client Client API Discovery Session Subscription Example OPC UA.NET Client SDK(OPC Foundation) OPC UA. NET Stack(OPC Foundation) SIMATIC NET S7 OPC UA server OPC UA Server Table 2-2 Module Description OPC UA . NET Stack The. NET OPC UA stack from the OPC Foundation for the realization of the network communication NET Client sDK The net oPc ua client sdk of the opc foundation the two dlls of the OPC foundation are part of the delivery of the SIMATIC NET CD Client AP Reusable, simplified and tailored to this net client aPi task It offers reusable C# classes for discovery, session and subscription handling Simple Client Simple user interface for the use of the Client API with the functions Connect Disconnect, Read, Write and Data Monitoring. This example also shows direct addressing and the handling of namespaces UA Client Convenient OPC UA client with the functions: discovery, connect, disconnect, browse, read of all attributes, write and data monitoring General functions such as browse, listing attributes and monitoring of data tags are encapsulated in reusable controls In this example the symbolic tags can be browsed and can be used directly from the browser S7 OPC UA server The SIMATIC NET OPC UA server implements the necessary server logic for sessions and subscriptions and the data connection to the S7 stations ET OPC UA-Client Entry|D42014088,V1.1,08/2014 10
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 输入关键字,在本站1000多万海量源码库中尽情搜索: