#NR8V1 : OPC-UA Server/Client

Application-Note: #NR8V1 : OPC-UA Server/Client

Related Documents:

  • Application-Note: #NR0V1 : Get Node-RED ready on my router
  • Application-Note: #NR1V1 : Hello World
  • https://nodered.org/docs/user-guide
  • https://flows.nodered.org/node/node-red-contrib-iiot-opcua

This application describes how to create an OPC-UA Server and provide Tags from a different source like S7. Also reads the variables from the OPC-UA Server and display them on dashboards. Use this application to understand OPC-UA Server or Client. It gives you the best example on how to handle OPC-UA.

Please consider that this application is running on the router and can be accessed via http or https://router-ip:1880/ui. You can access it also from outside through an Web2Go link from your mbCONNECT24 account.

Description 1 – Dashboard

The basic idea here is, that we receive an variable "Speed" from an S7 PLC and writing this variable to the OPC-UA Server. We also write a variable from dashboard (Cooling Temperature) to the OPC-UA Server. Finally the two variables are read from the OPC-UA Server with a client node and display them on the dashboard as gauges.

This is how the flow looks like.

Description 2 - Flow

This flow shows three segments. In the first segment we create the variables on the OPC-UA Server. They are "Speed" and "Temperature" in the folder "Turbine.

In the second segment we take the slider value "Cooling Temperature" and the S7 variable "Speed" and write the value to the OPC-UA Server, every time when they are updated.

In the third segment we listen on these variables "Speed" and "Temperature" of the OPC-UA Server and isplaying them at the dashboard.

From OPC-UA client view it looks like this:

ATTENTION:

In our example we use OPC-UA in anonymous mode which is NOT recommended in production use. Use at least "User/Password" or better an PKI with certificates. The OPC-UA Server has the capabilites to set this up:

Don't forget to open the OPC-UA Port in the firewall:

 

See below the Flow as a file to Import in your application.