Hilscher Community Forum
IoT Edge Gateway: Node-RED - ARRAY -> OPC UA - Printable Version

+- Hilscher Community Forum (https://forum.hilscher.com)
+-- Forum: General Infos (https://forum.hilscher.com/forum-28.html)
+--- Forum: Projects (https://forum.hilscher.com/forum-41.html)
+--- Thread: IoT Edge Gateway: Node-RED - ARRAY -> OPC UA (/thread-730.html)



IoT Edge Gateway: Node-RED - ARRAY -> OPC UA - AxelHa2111 - May-21st-2021

Hallo ALL,

I have a question about OPC UA.

I have a project with a OPC UA Server by Siemens Automation called Telecontrol Server Basic (TCSB). The Server is runing und working.

No I have to do a connection to IoT Edge Gateway by Hilscher with Node-Red.

The connection is also working and i can read some data from the Server. The data's on the Server are all Array by diffrent format's (sint, uint and udint).

Now i would like to write some values into a array (complettly or single array elements).

First i do it by a simple inject node with a function into a opc us output (is connected). But it didnt work.

The function code is "msg = {payload:{Value:{0:99,1:40,2:80,3:80,4:90,5:100,6:110,7:0,8:0,9:0}}};"

The error msg say "expecting a number". I don't now what number it mean's.

The opc topic is "dp.sp". The format is [array 0..0 of int]

Did anyone has an idea?

Thank you.


RE: IoT Edge Gateway: Node-RED - ARRAY -> OPC UA - Armin@netPI - May-21st-2021

Well, can you first of all tell us which nodes exactly you are using in your Node-RED flow? Node-RED has meanwhile over 3000 nodes and also more than one OPC UA client you can use.

You say you are able to read data from the Siemens OPC UA server. Can you please post what the green debug node in you Node-RED project prints out when you connect it to your OPC UA read node. With this method we are maybe able to see how the OPC UA read message is coded and hence how the write message may be coded.

Thx


RE: IoT Edge Gateway: Node-RED - ARRAY -> OPC UA - AxelHa2111 - May-21st-2021

(May-21st-2021, 03:05 PM)Armin@netPI Wrote: Well, can you first of all tell us which nodes exactly you are using in your Node-RED flow? Node-RED has meanwhile over 3000 nodes and also more than one OPC UA client you can use.

You say you are able to read data from the Siemens OPC UA server. Can you please post what the green debug node in you Node-RED project prints out when you connect it to your OPC UA read node. With this method we are maybe able to see how the OPC UA read message is coded and hence how the write message may be coded.

Thx
Hallo, thank you for your feedback.

i am using the node "opcua out"

Attachment:

- Screenshoot from OPC UA IN -> debug
- Screenshoot from OPC UA out -> Debug

Thank you for your help

Axel


RE: IoT Edge Gateway: Node-RED - ARRAY -> OPC UA - Armin@netPI - May-21st-2021

Well Axel,

can you please tell me which type of gateway you have exactly from Hilscher?

What is the exact name of the device printed on the label? NIOT-E-xxxxPI-xxx ?

Thx
Armin


RE: IoT Edge Gateway: Node-RED - ARRAY -> OPC UA - AxelHa2111 - May-21st-2021

Hello, the device is a little bit older.

I get it from a workshop in 2019. Now I had project where I want to use it (or a newer if it works)




Model name
NIOT-E-TPI51-EN-RE


Firmware version
V1.1.2.1


RE: IoT Edge Gateway: Node-RED - ARRAY -> OPC UA - Armin@netPI - May-21st-2021

Ok I see. I just wanted to know which device you are using. This device has a Node-RED preinstalled and also an OPC UA node set coming from this Node-RED developer https://flows.nodered.org/node/node-red-contrib-opcua. We just preinstalled this node set into the Node-RED installation ... but we are not well informed in all details about how all the nodes work and how they are provided with msg.payload data.

I am pretty sure that meanwhile newer versions are indicated on this web site than installed on your machine from year 2019. You can go into the top right Node-RED menu "manage palette" and see which version of OPC UA nodes currently is installed. Which version is it?

From my personal view ... I am sorry that I am not familiar with the OPC UA node set and how it is used exactly. I am pretty sure years ago I had used it ... but this is long time ago. The developer of any node has to provide a good documentation about the node's usage.

From you both pictures I would say read and write data are ok. What happens if you wire the read node directly to the write node without modifications and no usage of an own function node?