OPC UA实例 - 服务器为WinCC V7.3 SE - 客户端为精智面板
适用于 WinCC V7.4 SP1 的 OPC UA Excel 客户端

Table of ContentsTable of ContentsWarranty and Liability (2)1Introduction (4)1.1Overview (4)1.2Mode of operation and hardware configuration (5)1.3Components used (5)2Engineering (6)2.1Installation (6)2.2Integrating the WinCC example project (6)2.3Project setup and functioning (7)2.3.1The “Home screen” (7)2.3.2Process screen: “Heating Tank” (8)2.4Installing the OPC UA Client Library (10)2.5Customizing the host file (12)2.6OPC UA Excel client (13)2.6.1Description of the user interface (13)2.6.2Reading and writing of values (16)2.7Certificate exchange of encrypted communication (17)3Appendix (18)3.1Service and Support (18)3.2Links and literature (19)3.3Change documentation (19)1 Introduction1.1 OverviewMotivationA separate OPC UA server is included together with the connectivity pack forWinCC V7.4 SP1. This server makes it possible to access tag values of SCADAprojects from different systems and programs that also provide this communicationchannel.TaskThe requirement is to set up a connection between a WinCC OPC UA server andthe OPC UA Excel client provided. The Excel client can then be expanded orchanged, depending on requirement.The server and the client are located on separate PC stations.Applicative implementationTogether with this document you receive instructions that show you how toestablish a connection between WinCC OPC UA server and the Excel client.The download on the entry page provides you with the Excel client, the Excel OPCUA library as well as an example project that explains the work steps.This is how you are guided through the required configurations step by step.Screenshots and notes also support you.Assumed knowledgeBasic knowledge of WinCC V7 is assumed.1.2 Mode of operation and hardware configurationOverviewThe following figure shows you how the components interact in this configurationexample.Figure 1-1WinCC V7.4 SP1 ConPack OPC UA Excel clientCommunication channelNote1.32 Engineering2.1 InstallationMicrosoft Office InstallationA licensed Excel version has to be installed on the computer on which the client isto be run. Office version 2010 is used in this application example.Installing WinCC V7.4Install WinCC V7.4 SP1 Update 2 on the computer on which the Runtime is to runand follow the installation manual (see also \3\ in chapter 3.2). You can also use anexisting WinCC installation.Installing connectivity packInstall the Connectivity Pack V7.4 SP1 on the computer on which you also haveWinCC installed and follow the installation manual (see also \4\ in chapter 3.2). Youcan also use an existing installation of the connectivity pack.2.2 Integrating the WinCC example projectAdapting projects to the WinCC stationOpen the example project with your WinCC Explorer and adjust the computername. To do this, follow the steps below.1.Double-click on the “Computer” module in the project overview2.Open the context menu of the created computer in the editor window.3.Go to the menu item “Properties”.4.Adjust the “Computer name” to the one of your computer.5.Confirm the changes with the “OK” button.6.Close the project and reopen it for the settings to be effective.Result:You have now successfully opened the project on your computer and you can startRuntime.2.3 Project setup and functioningThe project contains a simulation of a heating tank. It consists of two screens, the“Home screen” and the “Plant screen”. The actual process screen is called from the“Plant screen” in a screen window.2.3.1 The “Home screen”DescriptionThe “Home screen” is the start screen of the example project. The control elementsand displays have the functions described below.Control elementsTable 2-12.3.2 Process screen: “Heating Tank”Structure of the process screenThe process screen consists of the boiler with intake, drain and a flow heater. The control elements are arranged in the bottom right corner.Control elementsTable 2-2NoteEach button resets the current processing step and starts the new one. Only one of the three processes can be active at the same time.123 456ActuatorsTable 2-3Process valuesThere are two relevant process values in this example. The filling level “Level” and the temperature “Temp”. Both are realized as internal tags and can, after being set up, be monitored and changed via the OPC UA Excel client.For the visualization of the “Level” process level a bar chart (10) was inserted in the boiler. An I/O field (9) on the right specifies the filling level in numeric form (percentage).The current temperature value “Temp” is output in an I/O field (8) that is located next to a symbolically placed measuring device on the top right corner of the boiler.Figure 2-31 23 456789102.4 Installing the OPC UA Client LibraryTo use the OPC UA client library, you need to register the library on your clientsystem. For this, you can use the Microsoft .NET Framework AssemblyRegistration Utility. The Utility (regasm.exe) is contained in the Microsoft .NETFramework 4.6.1.The instructions below show you the required steps:1.Install the .NET Framework 4.6.12.The path, in which the .NET Framework has been installed, is:"C:\Windows\\Framework\v4.0.30319".3.Download the "109752976_OPC_UA_ClientLibrary_CODE_V10.zip" file fromthe entry page.4.Unzip this file on the same drive on which your operating system is installed.To facilitate browsing, the following path was selected in this example: "C:\109752976_OPC_UA_ClientLibrary_CODE_V10".5.Start the command prompt as administrator.Figure 2-46.Register the library on your system. Enter the following command:"C:\Windows\\Framework\v4.0.30319\regasm.exeC:\109752976_OPC_UA_ClientLibrary_CODE_V10\OPC_UA_ClientLibrary\Application\OPC_UA_ClientLibrary.dll /tlb /codebase" and confirm the entry byclicking return.Note Make sure that the commands /tlb and /codebase are separated from the path entry and from each other and are preceded by a slash.For easier path entry, use the browse function of the command application that isexecuted with the tab button. This is how you can check the correctness of thepaths.Figure 2-5Result:You have now successfully registered the library for the OPC UA client on thecomputer and you can use it.2.5 Customizing the host fileDepending on the network architecture, it may be necessary to introduce the clientcomputer to the server to guarantee access to the communication endpoints ofWinCC. To do this, a host file is customized on the client and server PC. The stepsnecessary for it are described below.Note For further information on the operation of WinCC in Windows networks, please refer to the following entry:1.Navigate to the host file of the client computer in path“C:\Windows\System32\drivers\etc\hosts”.2.Open the host file using the notepad as administrator.3.Add the IP and the computer name of the server in the host file, as shown inthe following screen.4.Save and close the file.5.It is recommended to delete the comments in the host file.Figure 2-6Result:Now you have introduced the client to the server. You can call the endpoints viathe OPC UA Excel client.2.6 OPC UA Excel clientThis section describes the configuration and functioning of the Excel client. It islocated in the zip file that you can download on the entry page and in which theOPC library is also located. The client has the name“109752976_OPC_UA_ClientLibrary_Sample.xlsm”Note Requirement: OPC UA Client Library is registered on your system.Note This example creates an OPC UA client certificate for the current user with the common name (CN) CN = UA Client 1500If you want to change this setting, you need to adjust it in the .NET SourceCode.2.6.1 Description of the user interfaceThe user interface of the “OPC UA Excel Client” example client is divided in threesheets: “Connect” “ReadWrite” “Subscribe”“Connect”The following figure shows the “Connect” interface:Figure 2-71 2534The following table describes the interface functions of the previous figure:Table 2-4“ReadWrite”The following figure shows the “Read/Write” interface:Figure 2-8The following table describes the interface functions of the previous figure:Table 2-51 2 3 4567 8 9 1011 12 1314"Subscribe"The following figure shows the “Subscribe” interface:Figure 2-91 234The following table describes the interface functions of the previous figure:Table 2-6。
OPCUA实例-服务器为WinCCV7.3SE-客户端为精智面板

OPCUA实例-服务器为WinCCV7.3SE-客户端为精智⾯板OPC UA实例 - 服务器为WinCC V7.3 SE - 客户端为精智⾯板⽬录1概述 (3)2组态 WinCC V7.3 SE OPC UA服务器 (4)3组态TP1500 Comfort OPC UA客户端 (7)1概述本⽂档介绍西门⼦ HMI产品的 OPC UA应⽤。
该应⽤以西门⼦WinCC V7.3SE作为 OPC UA服务器,客户端使⽤TP1500 Comfort精智⾯板。
采⽤安全的通信⽅式。
TP1500 Comfort使⽤ X3以太⽹接⼝与 WinCC进⾏以太⽹连接。
注意:本⽂档着重说明 OPC UA应⽤的关键配置。
对于涉及到的软件(例如WinCC V13 SP1,WinCC V7.3)的基本操作将不会详细说明。
如果不熟悉这些软件的基本操作,请参阅其它相关⽂档。
本实例使⽤的硬件及软件参见表1-1。
硬件软件服务器PC Windows7 Ultimate 64-bit SP1WinCC V7.3 SE客户端TP1500 Comfort Windows7 Ultimate 64-bit SP1WinCC Professional V13 SP1(Comfort及Advanced版本也⽀持)表1-1实例所使⽤的硬件及软件2组态 WinCC V7.3 SE OPC UA服务器如图2-1所⽰,已经设置 WinCC V7.3 SE计算机IP地址为 192.168.40.36。
图2-1 WinCC V7.3 SE计算机IP地址创建⼀个新的 WinCC项⽬,项⽬名称为 OPCUASvr。
浏览到项⽬⽂件夹,找到 OPC UA服务器配置⽂件 OpcUaServerWinCC.xml,如图2-2所⽰。
图2-2 WinCC OPC UA配置⽂件使⽤记事本打开 OpcUaServerWinCC.xml⽂件。
如图2-3所⽰,进⾏相应的修改。
图2-3中,红框所⽰的内容有改动,其余内容保持不变。
基于WINCC组态软件和第三方自动化设备的数据访问和记录方法

作者简介:陈奕良(1992-),男,自动化工程师,从事纸张薄膜类自动化设备设备电气设计工作。
收稿日期:2021-02-261 WINCC 组态软件与第三方自动化设备1.1 WINCC 组态软件WINCC 是一种实现现场数据采集、过程可视化和过程监控的自动化工具,俗称SCADA 。
其运行在windows 环境下,具有很好的兼容性和扩展性,适合复杂系统操作和数据监控。
本文以WINCC professional V15为例,主要使用WINCC 组态软件开发第三方设备的可视化操作界面、过程数据监控以及数据库记录功能。
WINCC 的组态如图1所示。
图1 WINCC 自动化组态1.2 第三方自动化设备第三方自动化设备由乙方提供,为采购设备,并不参与甲方设备的系统集成,因此无法直接由WINCC 组态软件的默认HMI 通讯通道进行访问。
其控制系统由西门子SIMOTION 控制器和西门子触摸屏组成,如图2所示,SIMOTION 是以设备代理的形式与触摸屏通讯,是单独的一个自动化组态系统,没法集成到WINCC 里。
不过基本市售的工业HMI 触摸屏都是支持OPC 通讯的,西门子的也不例外,可以设置作为OPC 服务器,这样WINCC 作为客户端就能访问西门子触摸屏的变量了。
图2 第三方设备自动化组态2 系统组态2.1 配置WINCC 通讯WINCC 组态软件支持多种PLC 控制器驱动,比如西门子的S7-300/400和S7-1200/1500系列,第三方的比如AB 和三菱的TCP/IP 协议等等,但是和第三方品牌或者乙方的设备通讯时必须有对方的编程源程序或者有支持与其得通讯驱动,在本例WINCC 就基于WINCC 组态软件和第三方自动化设备的数据访问和记录方法陈奕良,张帆(广东金明精机股份有限公司,广东 汕头 515098)摘要:本文介绍了基于WINCC 组态软件和第三方设备的应用系统,在PLC 设计的系统中一般通过可视化面板进行操作,功能简单,功能扩展有限,而通过组态软件设计的可视化操作系统,可以使用组态软件的功能和其支持的VC/VB 脚本编辑器,完善和丰富系统操作功能,提高系统自动化可视化程度及数据监控功能。
如何通过OPC UA实现两台WinCC SCADA电脑间的客户端服务器通讯

如何通过OPC UA实现两台WinCC SCADA电脑间的客户端/服务器通讯?OPC UA(“开放平台通讯--统一架构”)是用于交换两台不同品牌设备或应用间数据的标准软件平台。
本常见问题详细描述了如何在两台运行WinCC SCADA的PC间配置OPC UA通讯以实现客户端服务器的应用。
运行WinCC组态软件的PC可以通过OPC UA服务器和OPC UA客户端实现通讯。
在通讯时,服务器和客户端需要交换安全认证证书,详细配置步骤如下:步骤1.在服务器的PC上启动WinCC Runtime。
2.在客户端的PC上打开WinCC工程的“变量管理”。
3.在工程向导中右键单击“变量管理”选项,在弹出菜单中选择“添加新的驱动”选择“OPC”。
图. 01OPC通道创建完成。
4.在工程向导中右键选择“OPC Groups...” 然后再弹出菜单中选择并打开“系统参数”。
图. 02打开“OPC条目管理器”界面。
5.点击“OPC UA服务器”按钮。
图. 03打开“添加OPC UA服务器”界面。
6.在“服务器信息”对话框中输入服务器的URL地址,格式为:"opc.tcp://[服务器]:[端口号]"。
其中,“[服务器]”中输入作为服务器的PC的IP地址;“[端口号]”中输入OPC UA服务器使用的端口号,默认端口是“4862”。
(如下图中所示)图. 047.在“安全性”对话框中,“安全策略”选择“Basic128Rsa15”,“消息安全模式”选择“签名和加密”。
(如上图所示,需要注意的是,设置为“无安全”也可以达到通讯的效果,但从安全角度考虑不推荐使用)点击“确定”关闭对话框。
8.在“OPC条目管理器”中选择新创建的OPC UA服务器选项。
点击“浏览服务器”按钮。
图. 05几秒钟后会弹出对话框,显示错误提示“此OPC服务器不支持浏览器接口!”点击“OK关闭提示框”。
图. 069.打开Windows浏览器访问WinCC的安装路径。
适用于WinCCV7.4SP1的OPCUAExcel客户端

适用于WinCCV7.4SP1的OPCUAExcel客户端Table of ContentsTable of ContentsWarranty and Liability (2)1Introduction (4)1.1Overview (4)1.2Mode of operation and hardware configuration (5)1.3Components used (5)2Engineering (6)2.1Installation (6)2.2Integrating the WinCC example project (6)2.3Project setup and functioning (7)2.3.1The “Home screen” (7)2.3.2Process screen: “Heating Tank” (8)2.4Installing the OPC UA Client Library (10)2.5Customizing the host file (12)2.6OPC UA Excel client (13)2.6.1Description of the user interface (13)2.6.2Reading and writing of values (16)2.7Certificate exchange of encrypted communication (17)3Appendix (18)3.1Service and Support (18)3.2Links and literature (19)3.3Change documentation (19)1 Introduction1.1 OverviewMotivationA separate OPC UA server is included together with the connectivity pack forWinCC V7.4 SP1. This server makes it possible to access tag values of SCADAprojects from different systems and programs that also provide this communicationchannel.TaskThe requirement is to set up a connection between a WinCC OPC UA server andthe OPC UA Excel client provided. The Excel client can then be expanded orchanged, depending on requirement.The server and the client are located on separate PC stations.Applicative implementationTogether with this document you receive instructions that show you how toestablish a connection between WinCC OPC UA server and the Excel client.The download on the entry page provides you with the Excel client, the Excel OPCUA library as well as an example project that explains the work steps.This is how you are guided through the required configurations step by step.Screenshots and notes also support you.Assumed knowledgeBasic knowledge of WinCC V7 is assumed.1.2Mode of operation and hardware configurationOverviewThe following figure shows you how the components interactin this configuration example.Figure 1-1Communication channelWinCC V7.4 SP1 ConPack OPC UA Excel clientNote1.32 Engineering2.1 InstallationMicrosoft Office InstallationA licensed Excel version has to be installed on the computer on which the client isto be run. Office version 2010 is used in this application example.Installing WinCC V7.4Install WinCC V7.4 SP1 Update 2 on the computer on which the Runtime is to runand follow the installation manual (see also \3\ in chapter 3.2). You can also use anexisting WinCC installation.Installing connectivity packInstall the Connectivity Pack V7.4 SP1 on the computer on which you also haveWinCC installed and follow the installation manual (see also \4\ in chapter 3.2). Youcan also use an existing installation of the connectivity pack.2.2 Integrating the WinCC example projectAdapting projects to the WinCC stationOpen the example project with your WinCC Explorer and adjust the computername. To do this, follow the steps below.1.Double-click on the “Computer” module in the project overview2.Open the context menu of the created computer in the editor window.3.Go to the menu item “Properties”.4.Adjust the “Computer name” to the one of your computer.5.Confirm the changes with the “OK” button.6.Close the project and reopen it for the settings to be effective.Result:You have now successfully opened the project on yourcomputer and you can startRuntime.2.3 Project setup and functioningThe project contains a simulation of a heating tank. It consists of two screens, the“Home screen” and the “Plant screen”. The actual process screen is called from the“Plant screen” in a screen window.2.3.1 The “Home screen”DescriptionThe “Home screen” is the start screen of the example project. The control elementsand displays have the functions described below.Control elementsTable 2-12.3.2 Process screen: “Heating Tank”Structure of the process screenThe process screen consists of the boiler with intake, drain and a flow heater. The control elements are arranged in the bottom right corner.Control elementsTable 2-2NoteEach button resets the current processing step and starts the new one. Only one of the three processes can be active at the same time.123 456ActuatorsTable 2-3Process valuesThere are two relevant process values in this example. The filling level “Level” and the temperature “Temp”. Both are realized as internal tags and can, after being set up, be monitored and changed via the OPC UA Excel client.For the visualization of the “Level” process level a bar chart (10) was inserted in the boiler. An I/O field (9) on the right specifies the filling level in numeric form (percentage).The current temperature value “Temp” is output in an I/O field (8) that is located next to a symbolically placed measuring device on the top right corner of the boiler.Figure 2-31 23 456789102.4 Installing the OPC UA Client LibraryTo use the OPC UA client library, you need to register the library on your clientsystem. For this, you can use the Microsoft .NET Framework AssemblyRegistration Utility. The Utility (regasm.exe) is contained in the Microsoft .NETFramework 4.6.1.The instructions below show you the required steps:1.Install the .NET Framework 4.6.12.The path, in which the .NET Framework has been installed, is:"C:\Windows\\Framework\v4.0.30319".3.Download the "109752976_OPC_UA_ClientLibrary_CODE_V10.zip" file from the entry page.4.Unzip this file on the same drive on which your operating system is installed.To facilitate browsing, the following path was selected in this example: "C:\109752976_OPC_UA_ClientLibrary_CODE_V10".5.Start the command prompt as administrator.Figure 2-46.Register the library on your system. Enter the following command:"C:\Windows\\Framework\v4.0.30319\regasm .exeC:\109752976_OPC_UA_ClientLibrary_CODE_V10\OPC_UA_C lientLibrary\Application\OPC_UA_ClientLibrary.dll /tlb /codebase" and confirm the entry byclicking return.Note Make sure that the commands /tlb and /codebase are separated from the path entry and from each other and are preceded by a slash.For easier path entry, use the browse function of the command application that isexecuted with the tab button. This is how you can check the correctness of thepaths.Figure 2-5Result:You have now successfully registered the library for the OPC UA client on thecomputer and you can use it.2.5 Customizing the host fileDepending on the network architecture, it may be necessary to introduce the clientcomputer to the server to guarantee access to the communication endpoints ofWinCC. To do this, a host file is customized on the client and server PC. The stepsnecessary for it are described below.Note For further information on the operation of WinCC in Windows networks, please refer to the following entry:1.Navigate to the host file of the client computer in path“C:\Windows\System32\drivers\etc\hosts”.2.Open the host file using the notepad as administrator.3.Add the IP and the computer name of the server in the host file, as shown inthe following screen.4.Save and close the file.5.It is recommended to delete the comments in the host file.Figure 2-6Result:Now you have introduced the client to the server. You can call the endpoints viathe OPC UA Excel client.2.6 OPC UA Excel clientThis section describes the configuration and functioning of the Excel client. It islocated in the zip file that you can download on the entry page and in which theOPC library is also located. The client has the name“109752976_OPC_UA_ClientLibrary_Sample.xlsm”Note Requirement: OPC UA Client Library is registered on your system.Note This example creates an OPC UA client certificate for the current user with the common name (CN) CN = UA Client 1500If you want to change this setting, you need to adjust it in the .NET SourceCode.2.6.1 Description of the user interfaceThe user interface of the “OPC UA Excel Client” example client is divided in threesheets: “Connect” “ReadWrite” “Subscribe”“Connect”The following figure shows the “Connect” interface:Figure 2-71 2534The following table describes the interface functions of the previous figure:Table 2-4“ReadWrite”The following figure shows the “Read/Write” interface:Figure 2-8The following table describes the interface functions of the previous figure:Table 2-51 2 3 4567 8 9 1011 12 1314"Subscribe"The following figure shows the “Subscribe” interface:Figure 2-91 234The following table describes the interface functions of the previous figure:Table 2-6。
WinCC实例教程

W i n C C实例教程(总62页) -CAL-FENGHAI.-(YICAI)-Company One1-CAL-本页仅作为文档封面,使用请直接删除WinCC 视频教程知识点总结第一讲组态软件基础一、WinCC简介1、WinCC西门子视窗控制中心SIMATIC WinCC(Windows Control Center)是在计算机上对PLC控制的运行设备进行状态监控的软件,是PC上的监控软件。
运行该软件,可以动画监视现场设备的运行状况,监视相应的运行参数,以及更改、设置系统的运行数据。
2、WinCC的特点(1)开放性WinCC对用户所添加的任何形式的扩充是绝对开放,该绝对开放性是通过WinCC的模块结构及其强大的编程接口来获取的。
(2)将应用软件集成到WinCC中WinCC提供了一些方法将其他应用程序和应用程序块统一地集成到用于过程控制的用户界面中。
OLE应用程序窗口和OLE自定义控制或Active控制可以集成到WinCC应用软件中。
(3)WinCC中的数据管理WinCC的数据库为Windows SQL,从属于WinCC,该数据库用于存储所有面向列表的组态数据(如变量列表和消息文本),以及当前过程数据(如消息,测量值和用户数据记录等)该数据库具有服务器功能。
(4)在项目开始之前规定组态分类a、文件夹名称除一些特殊字符(例如\)之外,文件夹名称允许使用所有的字符。
还允许使用数字0~9.b、变量名称变量名称可以多于8个字符。
但应尽量避免太长的名称。
WinCC项目的变量名称必须是唯一的。
如果变量名称还包含了其他信息,这对用户将非常有用。
c、画面名称确定画面名称时应注意其长度的影响,太长的名称(文件名)不容易识别(列表框中的选择,脚本中的调用等)。
根据经验表明,长度最好不超过28个字符,画面名称应遵守以下限制条件:①最大长度为255个字符;②不使用某些特殊字符(例如\);③画面名称中的字母不区分大小写。
WINCC7.3和1200如何建立OPC通讯
WINCC7.3和1200如何建立OPC通讯OPC之前,需要花费很多时间使用软件应用程序控制不同供应商的硬件。
存在多种不同的系统和协议;用户必须为每一家供应商和每一种协议订购特殊的软件,才能存取具体的接口和驱动程序。
因此,用户程序取决于供应商、协议或系统。
而OPC具有统一和非专有的软件接口,在自动化工程中具有强大的数据交换功能。
OPC(OLE for Process Control)是嵌入式过程控制标准,规范以OLE/DCOM为技术基础,是用于服务器/客户机连接的统一而开放的接口标准和技术规范。
OLE是微软为Windows系统、应用程序间的数据交换而开发的技术,是Object Linking and Embedding 的缩写。
OPC从数据来源提供数据并以标准方式将数据传输至任何客户机应用程序的机制。
供应商现在能够开发一种可重新使用、高度优化的服务器,与数据来源通信,并保持从数据来源/设备有效地存取数据的机制。
为服务器提供OPC接口允许任何客户机存取设备。
OPC将数据来源提供的数据以标准方式传输至任何客户机应用程序。
OPC(用于进程控制的OLE)是一种开放式系统接口标准,可允许在自动化/PLC应用、现场设备和基于PC 的应用程序(例如HMI或办公室应用程序)之间进行简单的标准化数据交换。
定义工业环境中各种不同应用程序的信息交换,它工作于应用程序的下方。
您可以在PC机上监控、调用和处理可编程控制器的数据和事件。
服务器与客户机的概念OPC数据项是OPC服务器与数据来源的连接,所有与OPC数据项的读写存取均通过包含OPC项目的OPC群组目标进行。
同一个OPC项目可包含在几个群组中。
当某个变量被查询时,对应的数值会从最新进程数据中获取并被返回,这些数值可以是传感器、控制参数、状态信息或网络连接状态的数值。
OPC的结构由3类对象组成:服务器、组和数据项。
OPC服务器:提供数据的OPC元件被称为OPC服务器。
WinCC中文手册-OPC服务器
OPC 客户机是访问过程数据、消息和 OPC 服务器归档的应用程序。通过 OPC 软件接口 进行访问。
OPC 服务器是一个程序,它提供给不同制造商的应用程序一个标准的软件接口。OPC 服务器是在处理过程数据的应用程序、各种网络协议和用于访问这些数据的接口之 间的中间层。
3.2.1.2 组态 WinCC OPC DA 客户机上的 WinCC 项目 ......................... 19
3.2.2
WinCC 和 SIMATIC NET FMS OPC 服务器之间的连接实例 ............... 21
3.2.2.1 组态 WinCC 至 SIMATIC NET FMS OPC 服务器的连接 .................. 22
3.3.1.2 支持的集合摘要 ................................................ 38
3.3.1.3 支持的功能概述 ................................................ 39
3.3.1.4 WinCC OPC HDA 服务器的时间格式................................. 40
1.3
兼容性 ......................................................... 3
1.4
在 WinCC 中使用 OPC.............................................. 4
WinCC与Visual C的OPC通讯实现
WinCC与Visual C的OPC通讯实现
王明月;王松
【期刊名称】《科技传播》
【年(卷),期】2012(0)22
【摘要】本文利用OPC接口实现了服务器WinCC组态软件和模型机Visual
C++客户端的通讯,完成了两者之间的数据交换。
详细介绍了Visual C++应用程序的代码实现过程,最终完成了OPC服务器与客户端的实时通讯。
【总页数】2页(P191-191,179)
【作者】王明月;王松
【作者单位】东北特殊钢集团大连特钢模具钢分公司,辽宁大连 116105;北京科技大学自动化学院,北京 100083
【正文语种】中文
【中图分类】O1
【相关文献】
1.如何运用OPC技术实现WinCC与西门子运动控制系统SIMOTION的通讯 [J], 钟时;
2.OPC技术在WINCC与组态王通讯中的应用 [J], 王永恩;常涛;刘轶;杨翔
3.西门子变频器的应用第6讲 SINAMICS G120变频器通过OPC与WinCC通讯[J], 李方园
4.WinCC与VC应用程序基于OPC接口的通讯 [J], 王松;张宏展;高博;毛永志
5.基于OPC的WINCC与和利时PLC的通讯应用 [J], 栾德爵
因版权原因,仅展示原文概要,查看原文内容请购买。
用OPC接口实现专家系统与WinCC互联
第29卷第1期2007年2月甘 肃 冶 金G ANS U MET ALLURGYVol.29 No.1Feb.,2007文章编号:167224461(2007)0120001203用O PC接口实现专家系统与W i n CC互联陈建功,王建民(河北理工大学计算机与自动控制学院,河北 唐山 063009)摘 要:介绍了OPC技术,利用W inCC中已有的OPC服务器端与专家系统中的OPC客户端实现了互联,重点描述了OPC客户端的开发。
关键词:OPC;专家系统;W inCC;客户端中图分类号:TP273 文献标识码:AOn Reali zed Connecti vity between Expert Syste mand W i n CC with OPC ServerCHEN J ian2gong,WANG J ian2m in(College of Computer and Aut omatic Contr ol of Hebei Polytechnic University,Tangshan063009,China)Abstract:The paper intr oduces the OPC technol ogy.It realized connectivity bet w een the OPC Server there has been in the W inCC and the OPC client in the expert syste m,the point described the devel opment that OPC client.Key words:OPC;expert syste m;W inCC;client1 前言随着计算机网络技术、控制技术、通信技术的发展,工业控制信息系统集成踏上了工业控制历史的舞台(信息集成将控制系统和企业的上层管理系统结合到一起)。
但是,随着现代工业的发展,工业现场可以采用的工业控制设备种类越来越丰富,包括分布式控制系统(DCS)、可编程逻辑控制器(P LC)、工业控制计算机、智能调节器等。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
OPC UA实例 - 服务器为WinCC V7.3 SE - 客户端为精智面板
目录
1概述 (3)
2组态 WinCC V7.3 SE OPC UA服务器 (4)
3组态TP1500 Comfort OPC UA客户端 (7)
1概述
本文档介绍西门子 HMI产品的 OPC UA应用。
该应用以西门子WinCC V7.3
SE作为 OPC UA服务器,客户端使用TP1500 Comfort精智面板。
采用安全的
通信方式。
TP1500 Comfort使用 X3以太网接口与 WinCC进行以太网连接。
注意:本文档着重说明 OPC UA应用的关键配置。
对于涉及到的软件(例如
WinCC V13 SP1,WinCC V7.3)的基本操作将不会详细说明。
如果不熟悉这些
软件的基本操作,请参阅其它相关文档。
本实例使用的硬件及软件参见表1-1。
硬件软件
服务器PC Windows7 Ultimate 64-bit SP1
WinCC V7.3 SE
客户端TP1500 Comfort Windows7 Ultimate 64-bit SP1
WinCC Professional V13 SP1
(Comfort及Advanced版本也支持)表1-1实例所使用的硬件及软件
2组态 WinCC V7.3 SE OPC UA服务器
如图2-1所示,已经设置 WinCC V7.3 SE计算机IP地址为 192.168.40.36。
图2-1 WinCC V7.3 SE计算机IP地址
创建一个新的 WinCC项目,项目名称为 OPCUASvr。
浏览到项目文件夹,找到 OPC UA服务器配置文件 OpcUaServerWinCC.xml,
如图2-2所示。
图2-2 WinCC OPC UA配置文件
使用记事本打开 OpcUaServerWinCC.xml文件。
如图2-3所示,进行相应的修
改。
图2-3中,红框所示的内容有改动,其余内容保持不变。
这样的设置,对应
OPC UA服务器参数为:端口是 4862,安全策略是 Basic128Rsa15,消息安全
模式为签名和加密。
如图2-4所示,创建一个内部变量 UA_tag。
图2-4创建变量
如图2-5所示,建立一个新画面 NewPdl0.pdl,并创建一个输入输出域,关联到
UA_tag变量。
图2-5建立画面并关联变量
将NewPdl0.pdl设置为起始画面,然后激活 WinCC。
如图2-6所示是WinCC 运行界面,在IO域中输入 125。
WinCC V7.3 SE OPC UA服务器组态完毕。
图2-6 WinCC V7.3 SE运行画面
注意:WinCC需要被正确授权。
如果使用了中文,必须有硬件加密锁。
演示模式下无法进行 OPC UA通信。
3组态TP1500 Comfort OPC UA客户端
使用 WinCC V13创建 TP1500 Comfort项目。
TP1500 Comfort使用 X3以太网
接口进行通信,如图3-1所示设置 TP1500 Comfort X3接口 IP地址为
192.168.40.211。
图3-1 TP1500 Comfort设置 IP地址
如图3-2所示,建立 OPC UA连接。
红框中为关键参数,必须保证正确无误。
其中通信驱动程序选择 OPC UA,UA服务器发现 URL为:
opc.tcp://192.168.40.36:4862,安全策略为:Basic128Rsa15,消息安全模式为:
签名和加密。
图3-2 TP1500 Comfort建立 OPC UA连接
如图3-3所示,打开变量表。
建立一个变量 Tag_1,连接选择Connection_1。
单击地址列的下拉三角,然后弹出连接失败的错误窗口。
单击X按钮关闭该窗口。
图3-3连接失败提示窗口
此时,在 WinCC V7.3的计算机上浏览到如图3-4所示的文件夹。
可以找到被拒绝的证书文件。
图3-4 WinCC V7.3 SE计算机上拒绝的证书文件夹
如图3-5所示,将上述证书文件拷贝到相应文件夹内。
图3-5 WinCC V7.3 SE计算机允许证书的文件夹
此时,再次进入 TP1500 Comfort项目的变量表中,单击下拉三角符号,即可以正常连接到WinCC V7.3的OPC UA服务器。
如图3-6所示,选择之前在WinCC V7.3中创建的变量 UA_tag后,单击V按钮关闭地址选择窗口。
配置完地址的变量参数如图3-7所示。
图3-7完成后的地址参数
在TP1500 Comfort项目中建立一个新画面,并放置一个输入输出域,关联变量Tag_1。
然后将项目下载到 TP1500 Comfort。
启动 TP1500 Comfort运行系统。
如图3-8所示,看到触摸屏IO域显示 #####。
图3-8 TP1500 Comfort通信失败界面
取消激活TP1500 Comfort运行系统。
如图3-9所示,双击触摸屏桌面上My
Computer图标,进入文件系统。
图3-9 TP1500 Comfort桌面图标
如图3-10所示,打开相应的文件夹,找到被拒绝的证书文件。
图3-10 TP1500 Comfort拒绝证书文件夹
将上述证书文件拷贝至如图3-11所示的文件夹内。
图3-11 TP1500 Comfort允许的证书文件夹
然后再次启动TP1500 Comfort运行系统。
可以看到触摸屏IO域仍然显示
#####。
此时在WinCC V7.3计算机上打开资源管理器,浏览到如图3-12所示的文件夹,找到被拒绝的证书文件。
图3-12 WinCC V7.3 SE计算机拒绝证书文件夹
将图3-12红框中的证书文件拷贝到图3-13所示的文件夹内。
图3-13 WinCC V7.3 SE 允许证书的文件夹
这样,就完成了OPC UA 认证。
通信已经成功建立。
如图3-14及图3-15所示,分别为 TP1500 Comfort 及WinCC V7.3 SE 的运行画面。
图3-14 TP1500 Comfort 运行画面
图3-15 WinCC V7.3 SE 运行画面。