• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IoT Edge Gateway: Node-RED - ARRAY -> OPC UA
#1
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.
  Reply
#2
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
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#3
(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


Attached Files Thumbnail(s)
       
  Reply
#4
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
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#5
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
  Reply
#6
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?
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Configuring S7-1200 PLC to communicate with node-red ... Cman587 3 5,057 January-27th-2021, 11:01 AM
Last Post: Armin@netPI
  InfluxDB, Node-RED and Grafana Armin@netPI 0 3,611 January-6th-2021, 02:36 PM
Last Post: Armin@netPI
  PROFINET to OPC UA data conversion with Node-RED Armin@netPI 0 3,485 July-7th-2020, 12:20 PM
Last Post: Armin@netPI
  Accessing Siemens S7 PLCs over Node-RED Armin@netPI 3 9,081 February-24th-2020, 06:44 PM
Last Post: jacp
Information NPIX-RCAN with node-red-contrib-canbus node patrick 0 2,082 August-22nd-2019, 02:36 PM
Last Post: patrick

Forum Jump:


Users browsing this thread: 1 Guest(s)