Difference between revisions of "OPC-UA Client"

From ESS-WIKI
Jump to: navigation, search
(Created page with "= Introduction = OPC Unified Architecture (OPC UA) is a machine to machine communication protocol for industrial automation developed by the OPC Foundation. = EdgeSense OPC-...")
 
Line 39: Line 39:
 
opcua-client.json setting file example:
 
opcua-client.json setting file example:
  
{| border="1" cellspacing="1" cellpadding="1" style="width:500px;"
 
|-
 
|
 
{<br/>&nbsp; &nbsp; "OPCUA_Server":[<br/>&nbsp; &nbsp; &nbsp; &nbsp; {<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "Name": "<span style="color:#0000FF;">ARK-OPCUA</span>",<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "endpointUrl":"<span style="color:#0000FF;">opc.tcp://desktop-2lhi6fa:62547</span>",<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "userIdentity": {<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "userName": "",<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "password": ""<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "NodeIDList":[{"NodeId":"<span style="color:#0000FF;">ns=2;s=1:CC2001?Input2</span>"},<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"NodeId":"<span style="color:#0000FF;">ns=2;s=1:CC2001?Output</span>"},<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"NodeId":"<span style="color:#0000FF;">ns=2;s=1:CC1001?Output</span>"}<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]
 
  
&nbsp; &nbsp; &nbsp; &nbsp; },<br/>&nbsp; &nbsp; &nbsp; &nbsp; {<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "Name": "<span style="color:#0000FF;">NB-OPCUA</span>",<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "endpointUrl":"<span style="color:#0000FF;">opc.tcp://nb050904:62547</span>",<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "userIdentity": {<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "userName": "",<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "password": ""<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "NodeIDList":[{"NodeId":"<span style="color:#0000FF;">ns=2;s=1:CC2001?Input2</span>"},<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"NodeId":"<span style="color:#0000FF;">ns=2;s=1:CC2001?Output</span>"},<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"NodeId":"<span style="color:#0000FF;">ns=2;s=1:CC1001?Output</span>"}<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]
+
<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; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp;<br/>&nbsp; &nbsp; ]<br/>}
 
  
|}
 
  
 
Name
 
Name

Revision as of 03:49, 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

Setup a OPC-UA sample server

OPC UA Sample Applications 1.02.msi are available at local server, please paste file's url in File Explorer to copy file.

After installing OPC UA Sample Applications 1.02.msi , launch DataAccess Server. Then, OPC-UA Client can connect to Server Endpoint URLs shown in application.

RTENOTITLE


Installation

Configuration

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

opcua-client.json setting file example:


{
    "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}
                        ]

        }
    ]
}




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