The endpoint is
This will be the IP address of your plc and the port number the opcua server is running on. Typically, the port is 4840 but you will need to verify your plc configuration.
“ns” = namespace index
The name space is, from what I understand, a number indicating what “section” of the server the tag is located.
There are many standard namespaces that will point you to different sections of the server. There is a section for global variables, one for program scope variables, server status, etc.
You must tell the server which namespace you want to access first.
“s” = string. This is not what you may think. It is not the data type of the tag you want to read, instead it is indicating that you are going to enter a tag address as a string. There are tags in the server that can be read by their nodeID number. To read a tag by nodeID, your address would look like this example:
Data types can be added to the address and come after the tag location. For example as:
I’ll break down my previous example:
I want to read a tag in the server at namespace 6.
The tag that I want to read is located in folder AsGlobalPV, and the tag is PTank.Temperature.
AsGlobalPV is a folder that contains my global variables on a B&R plc. Siemens may call it something else. TIAGlobal or something.
If you haven’t already, step out of node-red and get a free opcua client application from online somewhere. UaExpert is one off the top of my head. Get connected to your plc using it first. Once you are connected you will see the folder structure I am talking about.
If you can, post some pictures of your opcua server configuration in the Siemens software and also copy your flow from nodered to here.
I will also look at my configuration when I get back to work.