Kepware opcua两个电脑间的通讯设置
- 格式:pdf
- 大小:985.22 KB
- 文档页数:30
远程访问OPC服务器设置OPC客户端一方面可以访问本机上的OPC服务器,另一方面,它还可以利用微软的DCOM机制,通过网络来访问其它计算机上的OPC服务器,从而达到远程数据连接的目的。
访问本地服务器比较简单,只要检索本地的OPC服务器,并配置相应的组(Group)和数据项(Item)即可,通过网络访问时需要考虑较多的网络连接因素,大体上来说大概有如下的几个需要配置的方面(以WINXP Xp2为例):一. 运行OPC客户端的计算机和运行OPC服务器的计算机需要彼此能互相访问。
1.1要保证其物理连接,也就是网线正确的连接着两台计算机。
1.2在这两台计算机上分别建立同一个账号及密码,比如用户名[opcuser],密码[123456](注意:用户密码最好不要设置为空),在这两台计算上使用这个账户都可以登录系统。
关于增加账号及密码请参考对应Windows操作系统的帮助文档。
1.3启用各自Windows操作系统的Guest权限。
完成上面几步后,应该达到的效果是:从任何一台计算机搜索另一台计算机,都可以搜索到,并且可以访问对方计算机的共享目录及共享打印机等资源。
如下图:即便用户没有共享任何东西,也会显示空的共享文件夹,而不会产生诸如”不能访问”等信息。
如果不能访问对方的计算机,首先用ping命令来保证网络的连通,如果必要的情况下,可以关闭这两台计算机的防火墙(无论是winxp xp2自带的防火墙还是专用的防火墙)以及杀毒软件,以杜绝可能产生的问题。
如果访问另一台计算机产生”拒绝访问”的错误,可从网络查找相关资源进行解决。
二. 配置OPCServer所在的计算机2.1 注册OPCEnum.exe。
opcenum.exe是运行在服务器端的用于枚举本机OPC服务器的服务程序,由OPC基金会提供。
注册opcenum有如下几种方式:a)将opcenum.exe拷贝到系统目录下,然后用命令行运行opcenum /regserver 来注册它。
使用OPC UA 在两台PC 间交换数据OPC UA 不需要使用DCOM 来远程连接。
防火墙配置简单化,完全消除了DCOM 配置时的问题。
OPC 通道本身不是一个产品,它要求在client 端和server 端都支持OPC UA 。
OPC UA server 打包在OPC DA 、native interface 、一些情况下在DDE server 中。
要使用OPC UA 实现远程连接只需做很少的配置。
OPC UA client 是一个驱动,能在其下添加其他的设备channel 。
*在下文中:“server PC ”指作为OPC UA server 端的PC 机“client PC ”指作为OPC UA client 端的PC 机系统结构图1、Security 设置1》 OPC UA configuration在server PC 端操作运行KEPServerEX5,在桌面右下角右键单击“”打开“OPC UA Configuration ”,选中标签“Trusted Client ”,如下图若是红色“X ”,则右键点击“trust ”再选中标签“Trusted Server”,像上图中一样查看。
然后单击“close”关闭。
2》交换证书(方法1)第一步:在server PC上操作,右键桌面右下角小图标——选择“settings”——弹出右下对话框。
选中标签“Configuration”,勾选“Allow runtime to……”单击“确定”。
打开防火墙,开端口。
“开始”——“运行”——“firewall.cpl”选中标签“例外”,其中单击“添加端口”,弹出下图对话框。
点击“OK”。
端口添加成功。
第二步:在client PC上操作运行KEPServerEX5,在桌面右下角右键单击“”打开“OPC UA Configuration”选中标签“Trusted Server”,单击“exchange”弹出下面对话框单击“”弹出下图,选中“Remote Machine”中server PC的机器名与server机器上开的端口号对应*注:如果找不到要远程连接的server PC机,可以直接输入做server的 PC的IP地址,例如在局域网内“192.168.0.111”出现下图:点击“ok”完成之后会弹出对话框“the exchange was successfully”。
组态王7.5sp2破解补丁Patch QQ525755708 组态王7.5sp1破解补丁KingSCADA3.53破解补丁PatchQQ525755708KingSCADA3.52SP1破解补丁...........................................................................使用OPC UA在两台PC间交换数据OPC UA不需要使用DCOM来远程连接。
防火墙配置简单化,完全消除了DCOM 配置时的问题。
OPC通道本身不是一个产品,它要求在client端和server端都支持OPC UA。
OPC UA server打包在OPC DA、native interface、一些情况下在DDE server中。
要使用OPC UA实现远程连接只需做很少的配置。
OPC UA client是一个驱动,能在其下添加其他的设备channel。
*在下文中:“server PC”指作为OPC UA server端的PC机“client PC”指作为OPC UA client端的PC机系统结构图1、Security 设置1》 OPC UA configuration在server PC端操作运行KEPServerEX5,在桌面右下角右键单击“”打开“OPC UA Configuration”,选中标签“Trusted Client”,如下图若是红色“X”,则右键点击“trust”再选中标签“Trusted Server”,像上图中一样查看。
然后单击“close”关闭。
2》交换证书(方法1)第一步:在server PC 上操作,右键桌面右下角小图标——选择“settings”——弹出右下对话框。
选中标签“Configuration”,勾选“Allow runtime to……”单击“确定”。
打开防火墙,开端口。
“开始”——“运行”——“firewall.cpl”选中标签“例外”,其中单击“添加端口”,弹出下图对话框。
OPC Test
两台机器的DCOM设置,两台机器用户名和密码保持一致, 1. DCOM set up
start run dcomcnfg
上图4个按钮中的所有用户都需要“允许”
例如下图一共三个用户,这三个用户都需要设置“允许”权限
OpcEnum property
下图自定义中的所有用户都需要开权限,都“允许”
安全中也需要所有用户都允许
安全中也需要所有用户都允许
(注:做好dcom配置后,需要重新启动电脑才起作用。
所以为了安全起见,建议最好重新启动一下电脑,再做下一步)。
四、本地安全策略配置
1、OPC服务器和OPCClient服务器都要设置:打开“控制面版”à“管理工具”à打开“本地安全策略”
2、à安全选项—>”网络访问:本地帐户的共享和安全模式”->属性
3、选择“经典—本地用户以自己的身份验证”
注意一点不能忘了这一步,否则会在连接Opc服务器时报“拒绝访问”的错误!
五、其他设置
1、关闭操作系统运行的其他防火墙,杀毒软件等。
如何通过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的安装路径。
OPC与两台INTOUCH计算机通信
两台计算机之间intouch的通讯2022-04-1916:51
INTOUCH1#是连接现场PLC设备的机器,
INTOUCH2#是通过TCP/IP连接INTOUCH1#,去读取数据的机器Intouch1#的访问名的设定访问名:intouch1节点名:
应用程序名:modbu主题名:plc1
Intouch2#的访问名的设定访问名:intouch1
节点名:intouch1的计算机IP地址应用程序名:view主题名:tagname
北漂2022-05-2911:22:06两台计算机之间intouch的通讯。
INTOUCH1#是连接现场PLC设备的机器,
INTOUCH2#是通过TCP/IP连接INTOUCH1#,去读取数据的机器Intouch1#的访问名的设定访问名:intouch1节点名:
应用程序名:modbu主题名:plc1
Intouch2#的访问名的设定访问名:intouch1
节点名:intouch1的计算机IP地址/计算机名(如果没有是动态分布ip地址的话)应用程序名:view主题名:tagname
经过测试,没问题。
如在1#intouch建立TAG名:abc_1地址是300050,则在2#intouch建立变量名abc_1地址是abc_1;即2#变量名的地址是1#的变量名,要保证是同一数据类型。
最好保证两台计算机的用户名和密码是一样的。
OPC网络通讯调试说明一、OPC通讯调试前的基本设置:1、安装 OPC 驱动程序;2、OPC 组件的安装;OPCEnum.exe的主要作用是方便用户浏览本地或者远程计算机上的ProgID,用于遍历本地所有注册的 OPC Server 名称,为 OPC 通讯必须的服务。
DCOMServerProcessLauncher,为 DCOM 服务提供加载功能,如果关闭这个服务,会造成很多手动服务无法在需要的时候自动启动,而使许多依赖于DCOM组件的服务和程序无法正常工作。
安装完成后在计算机管理中“服务和应用程序”中的服务查看应当存在 DECOM Server Process Launder 和 OpcENUM 服务项(如下图)。
3、配置Windows 防火墙;使 OPC 通讯需要的相关程序通过防火墙信任,允许访问OPC Server所在计算机的TCP 135 端口(如下图)。
4、配置操作系统的安全策略;a、启用安全策略“网络访问:让每个人权限应用于匿名用户” (如下图)。
如果启用此策略,会将 Everyone SID 添加到为匿名连接创建的令牌。
在这种情况下,匿名用户可以访问 Everyone 组拥有权限的所有资源。
b、为使得可以接受远程计算机的 rpc 请求,可配置为按照来访者身份验证模式或来宾模式。
1)、来访者身份验证模式此安全设置确定如何对使用本地帐户的网络登录进行身份验证。
如果将此设置设为“经典”,使用本地帐户凭据的网络登录通过这些凭据进行身份验证。
“经典”模型能够对资源的访问权限进行精细的控制。
通过使用“经典”模型,您可以针对同一个资源为不同用户授予不同类型的访问权限(如下图)。
2)、来宾模式如果将此设置设为“仅来宾”,使用本地帐户的网络登录会自动映射到来宾帐户。
使用“仅来宾”模型,所有用户都可得到平等对待。
所有用户都以来宾身份进行验证,并且都获得相同的访问权限级别来访问指定的资源,这些权限可以为只读或修改(如下图)。
OPC UA通讯配置一、测试环境说明二、服务端设置(一)打开项目UA支持打开kepserver软件“File”-“Project Properties”打开“Project Properties”,选中“Configuration”选项页。
Enabel 项选中“Yes”,打开ua服务支持;“Allow anonymous login”项选中“No”,不允许匿名账户访问。
(二)安全设置桌面右下角,右键点击kepserver图标,选中Settings打开KEPServerEX Settings配置窗口,选中“Configuration”选项页,选中“Allow runtime to accept remote connections”,允许运行时接受远程连接。
* 打开防火墙配置,将32402端口增加到防火墙中。
(三)UA服务设置桌面右下角,右键点击kepserver图标,选中OPC UA Configuration打开OPC UA Configuration Manager配置窗口,选中“Server Endpoints”选项页,选中内容列表第一行数据,点击“Edit”。
打开“Endpoint Definition”,对应多网卡机器,需要选中使用的网卡及端口,然后查看下面opc.tcp://的地址是否是想要的IP及端口;安全策略建议选择“Basic128Rsa15”+“Sign”模式。
* 打开防火墙配置,将49320端口增加到防火墙中。
(四)配置登录账户桌面右下角,右键点击kepserver图标,选中Settings打开KEPServerEX Settings配置窗口,选中“User Manager”选项页,选中“Server Users”,右键选中“add User”。
打开“User Properties”,根据情况输入用户名及密码。
三、客户端设置(一)添加ua服务桌面右下角,右键点击kepserver图标,选中选中OPC UA Configuration打开“OPC UA Configuration Manager”,选中“Trusted Servers”选项页点击“Exchange”打开“Specify Server Instance”,输入相关信息“Remote host”输入10.1.1.3服务端IP“Remote Port”输入32402,与服务端保护一致,点击“OK”弹出“OPC UA Configuration Manager”提示框,提示“Certificates successfully exchanged.”说明服务添加成功。
使用OPCUA在两台PC间交换数据OPC UA(基于OPC Unified Architecture)是一种开放的、跨平台的、标准化的通信协议,能够进行工业自动化系统中的数据交换和通信。
使用OPC UA在两台PC之间进行数据交换,可以实现跨平台和跨网络的数据传输,实现异构设备之间的互操作性。
要在两台PC间进行数据交换,需要按照以下步骤进行操作:1. 安装OPC UA服务器软件:在每台PC上分别安装OPC UA服务器软件,比如常用的开源软件NodeOPCUA、Prosys OPC UA、Unified Automation OPC UA等。
安装完成后,配置服务器的基本信息,比如IP地址、端口号等。
2. 创建OPC UA数据模型:在服务器上创建OPC UA数据模型,定义数据的结构和属性。
数据模型的创建可以通过编程语言、OPC UA建模工具等方式进行,例如使用C#编写OPC UA服务器代码,或使用NodeOPCUA的建模工具创建模型。
3.配置OPCUA服务器:在服务器上配置OPCUA服务器,包括设置安全策略、用户认证、权限控制等。
这样可以确保数据传输的安全性和可靠性。
4.连接两台PC:在客户端PC上安装OPCUA客户端软件,连接到服务器上的OPCUA服务。
在客户端软件中,输入服务器的IP地址和端口号等连接信息,建立与服务器的通信。
5.读取和写入数据:通过OPCUA客户端软件,可以读取和写入服务器上的数据。
根据需要,设置合适的订阅和采样间隔,以实时获取数据。
6.处理数据:在客户端上,可以对获取到的数据进行处理、分析和可视化展示。
根据业务需求,可以将数据存储到数据库中,或发送到其他系统进行进一步处理。
7.错误处理和故障排除:如果在数据交换过程中出现错误或故障,需要进行错误处理和故障排除。
可以使用OPCUA提供的错误日志功能,分析错误日志以定位问题所在。
总结起来,使用OPCUA在两台PC间进行数据交换涉及安装和配置OPCUA服务器和客户端软件,创建数据模型,连接两台PC,读写数据,处理数据以及处理错误和故障排除。
KepServer软件与西门子PLC通信配置方法串口或以太网一、PLC采用自由口通讯配置方法配置a.在KepServerEx中新建一个空白工程,添加1个通道,在“Devicedriver”中选择SiemensS7-200;说明:如下图,SiemensS7MPI:指PLC300、SiemensS7-200:指PLC200、SiemensTCP/IPEthernet:PLC200和PLC300均可;然后设置与PLC通讯的电脑串口,其它基本采用默认即可,根据需要可调整设置;b添加一个设备,在“DeviceModel”选择S7-200;在设置“DeviceID”时一定要注意,这个值对应于PLC程序里“通讯”->“远程ID”;如果不对应,将无法通讯;c.添加tsg标签,注意IO地址的格式与以太网方式有点区别,其数据类型必须要在“Datatype”中设置才行,同样在上位机配置OPC驱动时也要注意IO点的数据类型;d.配置好后,可以用KepServerEx自带的quickclient来调试与PLC通讯是否正常,配置是否正确;组态上位机OPC驱动配置a.打开OPCTool配置工具,新建空白工程文件,添加opcserver、group、Item,注意所有的Enable均要打勾;注意:可以用添加多个IO项的方式快速设置;b.配置完成后,点击1:Start按钮,然后点击2:Statistics来进行状态监视,检查通讯配置是否正常;二、PLC采用以太网通信配置a.与自由口配置类似,新建空白工程,添加1个通道,注意在“Devicedriver”中选择SiemensTCP/IPEthernet类型;b.添加新的设备,设置deviceID为PLC以太网模块网口的IP地址;在设置LocalTASP均设为1000与RemoteTASP根据机架上IO扩展模块的个数决定时要特别注意;LocalTASP:PLC以太网通讯配置里指向上位机的;RemoteTASP:PLC自身的PLC的TASPc.在添加tag标签时,与自由口通信有区别,IO地址中标识了数据类型,所以在下面datatype中直接采用默认Default即可;接下来,配置上位机OPC驱动、调试方法等跟自由口通信方式完全一样,可以参考上面的说明;。
OPC Unified Architecture - Connectivity GuideJanuary, 2010Ref. 01.02©Kepware TechnologiesTable of Contents1. Overview (1)2. Prerequisites (1)3. Security (2)3.1 Automatic (2)3.2 Exchange (3)3.3 Manual (7)4. Setting up the Server (11)4.1 Endpoints (11)4.2 Firewall (13)5. Setting up a Discovery Service (Optional) (15)5.1 Server (15)5.2 OPC Foundation (17)6. Setting up the Client (22)6.1 OPC UA Client Channel (22)6.2 OPC UA Client Device (26)6.3 Verification (28)7. Summary (28)1.O verviewThe idea of setting up a remote OPC connection can even bring fear to those who are vastly familiar with DCOM and classic remote OPC. Out of desperation, it may even be common practice to disable firewalls and also expose the computer to unauthorized or anonymous users. Even if a firewall is in place, DCOM requires that port 135 be added to the exception list by default. This port is used for Microsoft’s Remote Procedure Call and has been the target of many malicious attacks. So how can a safe and secure remote OPC connection be established?The solution comes in the form of a new specification known as OPC Unified Architecture (OPC UA). OPC UA does not require callbacks and the use of DCOM for remote connections. This greatly simplifies firewall configuration and completely eliminates the headache known as DCOM.The OPC Tunnel is not a product in itself, but rather a feature that is created out of existing components that are available. The tunnel requires the same client-server architecture as any OPC product; however, the client and server both need to have OPC UA support. In this case, it happens that the client and the server are part of the same product package.The OPC UA server is packaged in with the OPC DA, native interface and, in some cases, DDE servers. By default, the OPC UA server is running and waiting for local connections immediately after the product has been installed. Minor configuration changes are required to allow remote connections. The OPC UA client is actually a driver channel that can be added along with any other device channel. If required, an OPC UA client and an OPC UA server can both be running on the same computer and be sharing data with a remote computer with the same configuration. The result is a connection between two remote servers with the ability to easily share items in a secure way. 2.P rerequisitesInstall the server application on the client computer and include OPC UA Client on the Select Features page under Communication Drivers.Install the server application on the server computer. Since UA functionality is included, no additional features need to be selected during the install.Some situations are going to require that each computer act as a server as well as a client. If so, install the OPC UA Client driver on each computer that needs to access items remotely.3.S ecurityIn place of relying on the computer’s operating system to secure the applications, OPCUA uses X.509 authentication technology. This technology consists of a set of public andprivate keys for each entity wishing to establish a trust. The private key is protected while the public key is placed into a certificate for distribution. In order to establish asecure connection between a client and the server, their certificates must first be “swapped” and also “trusted”. The swap is only required to be done once for the lifetime of the certificate.There are a few options when deciding how to swap certificates: automatic, exchange,and manual. The automatic trust can be established during runtime when the client first attempts to connect to the server. Several UA client and server applications support this feature and most present a dialog requesting that the user trust or reject the incoming certificate. Because the Runtime doesn’t interact with the desktop, an extra step may be required on the server to “Trust” the certificate once it has been swapped. The exchange is preformed from the client side and only takes an instant to complete; however, the server computer must have an open port in the firewall and the Runtime must be allowed to accept remote configuration on that port. The manual method consists of exporting and importing a certificate file on each computer using removable media or another form of file transfer for the exchange to take place. The manual process also allows for swapping certificates between client and server applications that do not support automatic exchange.If security is not necessary, the certificate swap can be skipped. The level of security is set by the server when defining the endpoints. If None, None is selected as the a Security Policy, certificates are not checked for validation. For unsecure connections, move on to Setting up the Server.3.1AutomaticThe automatic swapping of the certificates only happens when it is required. For instance, adding an OPC UA Client channel and selecting a secure serverendpoint will prompt the user to allow the server to be trusted. Once a device is added to the OPC UA Client and user attempts to import items, the server willfirst need to trust the client. By design, this server cannot post a dialog to thedesktop so a method of trusting swapped certificates was implemented.First, let’s assume the project was already configured for this application’s ownclient and server. The client has attempted to connect for the first time so thecertificates have swapped, but are not yet trusted.1.Right-click on the Administration icon and select OPC UA Configuration.2.View the Trusted Servers tab.3.If the server’s certificate appears with a red ‘X’ it is also not yet trusted.Right-click on the certificate and select Trust.4.View the Trusted Clients tab.5.If the client’s certificate appears with a red ‘X’ it is not yet trusted. Right-clickon the certificate and select Trust.3.2Exchange1.Right-click on the Administration icon, select Settings and choose theConfiguration tab.2.Enable remote configuration by checking Allow runtime to accept remoteconnections. The change will only be applied when the Configurationinterface is shutdown since it is using the same port to configure the Runtime locally.3.Add an exception to the windows firewall for port that is specified inCommunicate using port property on the Configuration tab. Anotheroption is to temporarily turn off the firewall before the exchange is performed and return the firewall back to its secure state when the process is complete.This method also prevents unauthorized users from exchanging certificates in the future.4.Enable the exception in the windows firewall for File and Printer Sharing.5.From the client computer, launch the OPC UA Configuration Manager byright-clicking on the Administration icon and selecting OPC UAConfiguration.6.Select the Trusted Servers tab.7.Select Exchange.8.When the Server Instance dialog appears, click the Browse icon to theright of the Remote host field. Some newer operating systems will be required to have discovery and file sharing enabled.9.Browse to the server by navigating the tree.10.Select the computer name and select OK.11.Verify that the correct port is identified in the Remote port field. This valueshould be the same as what was viewed on the server computer when the exception was made to the firewall. This port is used for remote configuration of the server.12.Select OK.13.A message will appear stating that the exchange was successful. The servercertificate should appear in the Trusted Servers window and can beidentified by the URI.unch the OPC UA Configuration Manager on the server computer. Theclient certificate should already in the Trusted Clients window and can beidentified by the URI.3.3Manualunch the OPC UA Configuration Manager on the server computer byright-clicking on the Administration icon and selecting OPC UAConfiguration.2.Select the Instance Certificate tab.3.Under the Server group, select Export server certificate.4.Select a location for the certificate file so that it can be easily located. Thedefault file name is the thumbprint that identifies the certificate, but it may be changed to make managing the files easier.5.Manually copy the server certificate file from the server computer and moveit onto the client computer.unch the OPC UA Configuration Manager on the client computer.7.Select the Trusted Servers tab.8.Select Import and locate the server certificate file.9.Select Open.10.The server certificate should appear in the Trusted Servers window and canbe identified by the URI.11.Select the Instance Certificate tab.12.Under the Client Driver group, select Export client driver certificate.13.Select a location for the certificate file so that it can be easily located. Again,the file name can be changed if desired.14.Manually copy the client certificate file from the client computer and return itto the server computer.unch the OPC UA Configuration Manager on the server computer.16.Select the Trusted Clients tab.17.Select Import and locate the client certificate file.18.Select Open.19.The client certificate should appear in the Trusted Clients window and canbe identified by the URI.4.S etting up the Server4.1EndpointsIn order for an OPC UA client to connect to an OPC UA server, the client needs to know the server location and security requirements. In its complex form, theclient will use a location and port number, called a Discovery Endpoint, todiscover information about the server. The server will, in turn, return all configured endpoints along with security requirements that are available to the client.To simplify the process, the Discovery Endpoint and the Server Endpoint can be the same location as is the case for this server application.During the install of the server application, an initial endpoint is created for local connections. Minor configuration changes are required to allow remote clients to discover and connect to the server. To become familiar with this configuration or to add and make changes to the existing endpoints, follow these steps:unch the OPC UA Configuration Manager by right-clicking on theAdministration icon and selecting OPC UA Configuration.2.Select the Server Endpoints tab.3.Select the default endpoint that was created during the install for non-localconnections.4.Select Edit.5.Make note of the port number so that it can be added to the firewall.6.If necessary, modify the settings in the Security Policies group. Since thesesettings are for the server, this particular endpoint will allow all connectionswith the enabled policies. I.e. the default endpoint will only allow secureconnections using signing and encryption. If security is not required, selectNone and you may also want to disable the security policies completely.7.With the policies adjusted accordingly, select OK.8.Enable the endpoint by selecting it in the list and checking the Enable box.9.Apply the changes to the server Runtime by right-clicking on theAdministration icon and selecting Reinitialize or if the server is notrunning, select Start Runtime.4.2FirewallThe purpose of a firewall is to drop incoming traffic that is not expected(unsolicited traffic) or traffic that does not correspond to the exceptions(excepted traffic) that are set within the firewall. Since OPC UA does not require callbacks, only the server computer needs to have the exception.To add the exception, follow these steps on the server computer:unch the Windows Firewall by selecting Start | Run and then typingfirewall.cpl.2.Windows Vista or Windows Server 2008 will not directly display the settingsdialog. To view the dialog, select Change Settings.3.Select the General tab.4.Verify that the firewall is enabled by choosing On.5.Select the Exceptions tab.6.Click Add port.7.Enter UA Endpoint in the Name field.8.Enter the port number that is assigned to the endpoint in the Port numberfield.9.Verify that the correct Protocol is selected. The default is TCP.10.Click OK.11.If multiple endpoints are assigned to the server, continue to add them now.12.When done, click OK to close the settings dialog.5.S etting up a Discovery Service (Optional)Those who are familiar with Classic OPC are familiar with an application called OPCEnum. This application runs locally on the serving computer and exposes available Classic OPC servers to the remotely connecting client(s). A client simply needs to know the serving computer’s location on the network.Unfortunately, OPC UA lost this luxury in exchange for its platform independence. However, to provide the same usability, a service was created that allows OPC UA servers to be discovered at a “well-know” location. This service, called the Local Discovery Service (LDS), is expected to be installed on every computer that is running an OPC UA server (the same way OPCEnum is installed alongside most Classic OPC servers). However, the development and implementation of the LDS is not as far along as OPC UA itself so the actual usage or the service will vary.This server application does not provide a LDS, but can be register for discovery by exchanging certificates with one provided by the OPC Foundation.5.1Serverunch the OPC UA Configuration Manager by right-clicking on theAdministration icon and selecting OPC UA Configuration.3.Under the Server group, select Export server certificate.4.Select a location for the certificate file so that it can be easily located. Thedefault file name is the thumbprint that identifies the certificate, but it maybe changed to make managing the files easier.5.If the Local Discovery Service is on another machine, manually copy theserver certificate file from the server computer and move it onto thecomputer that is running the service.7.Select Import and locate the LDS certificate file.8.Select Open.9.The LDS certificate should appear in the window. The URL defaults tolocalhost and must be changed if it resides on a remote computer.5.2OPC Foundationunch the Microsoft Management Console by selecting Start | Run andthen typing mmc.exe.2.Select File | Add/Remove Snap-in.3.In the Available snap-ins window, select Certificates.4.Click Add.5.Choose Computer account in the Certificates snap-in dialog.6.Click Next.7.Choose Local computer in the Select Computer dialog.8.Click Finish.9.Back in the Add or Remove Snap-ins dialog, click OK to apply the changesto the console.10.Under the Console Root folder, expand Certificates (Local Computer),UA Applications, Certificates and select UA Local Discovery Server.11.Select Action | All Tasks > Export.12.Select Next to begin the exportation process.13.Choose DER encoded binary X.509 for the file format.14.Click Next.15.Supply a file name and a destination for the certificate.16.Click Next.17.Review the summary and click Finish.18.Under the Console Root folder, expand Certificates (Local Computer),UA Applications and select, Certificates.19.Select Action | All Tasks > Import.20.Click Next to begin the importation process.21.Browse to the server certificate file that was previously exported from theOPC UA Configuration Manager.22.Click Open.23.Click Next.24.Choose Place all certificates in the following store on the CertificateStore page. Ensure that the UA Applications store is displayed as the destination.25.Click Next.26.Review the summary and click Finish.27.The server’s certificate will appear in the UA Applications store.The discovery service is now configured.6.S etting up the Client6.1OPC UA Client ChannelThe channel wizard is used to locate and identify the OPC UA server, configure session timeouts, and provide user information when applicable.Add a UA Client channel by following these steps:unch the Configuration by right-clicking on the Administration icon andselecting Configuration.2.Select Edit | Devices > New Channel.3.On the Identification page, supply a name for the OPC UA client channel.4.Click Next.5.On the Device Driver page, select OPC UA Client in the Device driver list.6.Click Next.7.Make no changes on the Write Optimization page.8.Click Next.9.On the UA Server page, the server’s endpoint URL can be manually enteredinto the Endpoint URL field. The user can also choose to browse for thecomputer.10.Click the Browse icon to the right of the Endpoint URL field.11.Begin with disabling the Use Discovery URL option. This option is disabledby default.12.Enter the endpoint port number that was created on the server computer inthe Discover Port field. The default port number should already be assigned and should agree with the default endpoint. Also, port 4840 will always be scanned by the browser so if a discovery server is being used, it is notnecessary to enter the correct port number in this field.13.If the port number was changed, click Refresh.14.Navigate the browse tree to locate the server computer by its name.Endpoints that are assigned to localhost will only be found under the Local Machine branch.15.Expand the computer and below it will be a list of available servers.16.Expand the server(s) and select the correct endpoint.17.If you wish to continue to use this endpoint to discover OPC UA servers,enable the Use Discovery URL in the Discovery group at the top of the dialog. This is a global change that will affect all other UA client drivers when this dialog is used.18.Click OK.19.The endpoint information will appear in the UA Server page.20.Click Next.e defaults on the UA Session page. These can be optimized later.22.Click Next.23.Keep the username and password blank on the Authentication page is notrequired.24.Click Next.25.View the Summary and click Finish.6.2OPC UA Client DeviceThe device wizard will guide the user in setting up a subscription and will alsoprovide a way to browse and import items from the OPC UA server. All the items in the device will update according to the settings provided. Multiple devices can be added to the same channel to allow for different update intervals and modes.Add a UA Client device by following these steps:1.With the new channel selected, select Edit | Devices > New Device.2.On the Name page, supply a name for the OPC UA client device.3.Click Next.e defaults on the Subscription, Keep Alive, Priority and Timeout,Monitored Items, and Deadband pages. These can be optimized later.5.Click Next for each page.6.On the Import page, click the Select import items.7.The server’s available items should appear in the Browsing window. If not,the security configuration is incorrect. See Trouble Shooting.8.Select the desired items on the left and click Add Items or Add Branch toimport them into the client.9.When all the items are imported, click OK.10.Click Next back on the Import page.11.View the Summary and click Finish.12.The imported items will populate under the device using the server’s channeland device names as groups.6.3VerificationThe items added in the OPC UA Client can now be browsed by an OPC DA client.For easy verification, follow these steps:1.Simply select Tools | Launch OPC Quick Client. A connection to the localOPC DA server will be established and all items will populate the view.2.Browse for the items in the OPC UA channel and verify that the data’s qualityis good and values are updating.7.S ummaryOPC Unified Architecture provides a means of exchanging data between an OPC server and an OPC client that aims to be platform independent, firewall friendly and secure. While UA is rather new to the OPC world, its current implementation in this application benefits users who are attempting to establish remote connections between a server and its clients. For more information about OPC UA, refer to the OPC Foundation at /.。