Difference between revisions of "OPC-UA Client"

From ESS-WIKI
Jump to: navigation, search
Line 41: Line 41:
 
== Configuration ==
 
== Configuration ==
  
EdgeSense OPC-UA client can manage multi OPC-UA setting and multi NodeID . 
+
EdgeSense OPC-UA client can manage multi OPC-UA setting and multi NodeID.
 +
 
 +
 
 +
<pre>
 +
{
 +
    "OPCUA_Server":[
 +
        {
 +
            "Name": "OPCUA-SERVER-1",
 +
            "endpointUrl":"opc.tcp://opcuaserver1:62547",
 +
            "userIdentity": {
 +
                "userName": "admin",
 +
                "password": ""
 +
            },           
 +
            "NodeIDList":[{"NodeId":"ns=2;s=1:CC2001?Input2","Name":"CC2001-Input2", "Type":"v", "Interval":2},
 +
                          {"NodeId":"ns=2;s=1:CC2001?Output","Name":"CC2001-Output", "Type":"v", "Interval":2},
 +
                          {"NodeId":"ns=2;s=1:CC1001?Output","Name":"CC1001-Output", "Type":"v", "Interval":2}
 +
                        ]
 +
 
 +
        },
 +
        {
 +
            "Name": "OPCUA-SERVER-2",
 +
            "endpointUrl":"opc.tcp://opcuaserver2:62547",
 +
            "userIdentity": {
 +
                "userName": "admin",
 +
                "password": ""
 +
            },           
 +
            "NodeIDList":[{"NodeId":"ns=2;s=1:CC2001?Input2","Name":"CC2001-Input2", "Type":"v", "Interval":2},
 +
                          {"NodeId":"ns=2;s=1:CC2001?Output","Name":"CC2001-Output", "Type":"v", "Interval":2},
 +
                          {"NodeId":"ns=2;s=1:CC1001?Output","Name":"CC1001-Output", "Type":"v", "Interval":2}
 +
                        ]
 +
 
 +
        }
 +
    ]
 +
}
 +
<pre/>
 +
 
 +
 
 +
 
 +
 
 +
 
 +
&nbsp;
  
 
Name
 
Name
Line 55: Line 95:
 
*Assign Node ID you'd&nbsp;like to monitor
 
*Assign Node ID you'd&nbsp;like to monitor
  
<br/>
 
 
<br/>
 
<br/>
  

Revision as of 03:16, 19 December 2019

Introduction

OPC Unified Architecture (OPC UA) is a machine to machine communication protocol for industrial automation developed by the OPC Foundation.



EdgeSense OPC-UA Client

EdgeSense OPC-UA Client aims to collect data from OPC-UA Server and control.

Feature:



How to

Software Requirements

  • MQTT broker
  • Node.js



Installation

Windows: 1.Download OPC-UA Service for Windows from Release Table. 2.Double click to launch the installer to install it to the machine.

Linux: 1.Download OPC-UA Service for Windows from Release Table. 2.Launch the installer to install it to the machine.



Configuration

EdgeSense OPC-UA client can manage multi OPC-UA setting and multi NodeID.


{
    "OPCUA_Server":[
        {
            "Name": "OPCUA-SERVER-1",
            "endpointUrl":"opc.tcp://opcuaserver1:62547",
            "userIdentity": {
                "userName": "admin",
                "password": ""
            },            
            "NodeIDList":[{"NodeId":"ns=2;s=1:CC2001?Input2","Name":"CC2001-Input2", "Type":"v", "Interval":2},
                          {"NodeId":"ns=2;s=1:CC2001?Output","Name":"CC2001-Output", "Type":"v", "Interval":2},
                          {"NodeId":"ns=2;s=1:CC1001?Output","Name":"CC1001-Output", "Type":"v", "Interval":2}
                        ]

        },
        {
            "Name": "OPCUA-SERVER-2",
            "endpointUrl":"opc.tcp://opcuaserver2:62547",
            "userIdentity": {
                "userName": "admin",
                "password": ""
            },            
            "NodeIDList":[{"NodeId":"ns=2;s=1:CC2001?Input2","Name":"CC2001-Input2", "Type":"v", "Interval":2},
                          {"NodeId":"ns=2;s=1:CC2001?Output","Name":"CC2001-Output", "Type":"v", "Interval":2},
                          {"NodeId":"ns=2;s=1:CC1001?Output","Name":"CC1001-Output", "Type":"v", "Interval":2}
                        ]

        }
    ]
}
<pre/>





 

Name

*Assign name for a OPC-UA server.

endpointUrl

*Assign OPC-UA Server Endpoint URL , format is opc:tcp://hostname:Port/  , hostname also can use ip address.

NodeId

*Assign Node ID you'd like to monitor

<br/>

== Demonstrate to connect to a OPC-UA sample server ==

1. Download and install OPC UA Sample Applications 1.02: [file://eossfs/ESS-Release/EdgeSense/Tools/OPCUA/ OPC UA Sample Applications 1.02.msi] are available at local server, please paste file's url in File Explorer to copy file.

2. After OPC UA Sample Applications 1.02.msi  is installed, launch DataAccess Server.

3. Config OPC-UA Client to connect to the sample Server,  Endpoint URLs shown in application.

[[File:DataAccessServer screenshot.png|RTENOTITLE]]


4. Edit opcua-client.json to set up client configuration, for example:


<pre>{
    "OPCUA_Server":[
        {
            "Name": "OPCUA-SERVER-1",
            "endpointUrl":"opc.tcp://desktop-2lhi6fa:62547",
            "userIdentity": {
                "userName": "admin",
                "password": ""
            },            
            "NodeIDList":[{"NodeId":"ns=2;s=1:CC2001?Input2","Name":"CC2001-Input2", "Type":"v", "Interval":2},
                          {"NodeId":"ns=2;s=1:CC2001?Output","Name":"CC2001-Output", "Type":"v", "Interval":2},
                          {"NodeId":"ns=2;s=1:CC1001?Output","Name":"CC1001-Output", "Type":"v", "Interval":2}
                        ]

        }
    ]
}