Write to opc ua nodes/machine attributes

Hi there,

I’m currently building an application to control a machine. The machine uses a Siemens PLC and I can connect to the PLC using OPC UA.

I have configured it as a machine with the opc ua data source and added some machine attributes. Now I can read these attributes in my application, but I can’t write to these attributes directly from the application.

Is there a way to write to the attributes and manipulate them in the opc ua node on my PLC?

I found a way using node-red, but it’s much more complicated to configure because I couldn’t find a direct way to write to node-red. So I had to set up a REST API connector between Tulip and Node Red to send data from Tulip to Node Red. To send data from Node Red to Tulip, I can use the machine attribute node.

Thank you in advance.

1 Like

Which OPC UA server do you use? (Embedded in PLC, Kepware, other, …)

I use the embedded OPC UA Server in the PLC. But I’m planning to integrate a Kepware OPC UA Server aswell.

If you plan to use Kepware, you can activate Kepware IoT gateway and expose « write tags » with REST protocol and after use HTTP connectors functions to send command to your PLC via OPC server. If Node-RED is embedded in your PLC you can as well expose an REST EndPoint. But with this architecture every PLC should have access to Tulip connector host (cloud or on-prem). The good choice depend on your scope and scalability priority

1 Like

So I have to use a HTTP connector to connect to my device. There is no direct way to write to opc ua nodes with Tulip?

From my knowledge of the platform, not at the moment

1 Like

Okay, thank you. Then I have to use node red.

Hello,
Is there any update on this? It would be very useful for creating machine HMI’s. This is something that is very easy to do in Ignition.
I built out a whole proof of concept machine code with python, using a free python OPC library to run the server.
I experimented with node red, it worked but it seems to add a whole bunch of extra steps for the exact same functionality of OPC. And I don’t trust node red to be as robust in an industrial controls application as OPC.
Then I set up the a test HMI, machine type, added the machine, connected all the attributes. The whole thing.
I was very disappointed when to read this thread. Writing to OPC devices seemed like such an obvious feature.
Is the ability to write to OPC devices something that will be added in the near future?

Not the end of the world though. I can still use the OPC for monitoring and figure out a different way to send the control commands.

1 Like

Hey @seamuss1

I am the Product Manager who is responsible for the machine monitoring offering at Tulip. Write to OPC UA is something that is absolutely top of mind for the team. We are moving into doing our planning for 2024 as we speak. Current thinking is that we will probably tackle MQTT write, ahead of OPC UA write for a few reasons, but with this work, we plan to implement patterns in the product to make it quite straightforward to add OPC UA write.

We have been fairly sluggish implementing OPC UA write for concerns around giving customers features that can be used in ways that could incidentally damage machinery. We want to tackle this need, we are just also committed to doing it responsibly.

Pete

4 Likes

Hi,

I’m trying to Read data from Siemens PLC (CPU 1513-1 PN) to Tulip using OPC UA Communication.

  1. I have configured OPC UA Data source and Tested the Connection – Found OK
  2. Created Machine Type and added Machine Attributes
  3. Created Machine and trying to Map the attributes
    Problem: PLC Tags are not showing to map but in Objects I’m able to see the PLC Name

Thank you in advance

Hey @Chiranjeevi -

Siemens S7 PLC OPCUA servers expose an uncommon data type which will not render in the product, and cannot be mapped to machine attributes. We have a warning about this in the Knowledge Base. This warning is primarily for S7 servers, as we have seen this before.

There is not an easy way for us to extend the product to support this data type.

We build the product for full compatability with Kepware, and have a number of cutomers who run today with kepware between the PLC and Tulip.

Pete

1 Like

Hi Pete,

we managed to access the s7 opcua server. Our s7 developer created a dedicated Server interface with TIA Portal. If you just expose the brick it won’t show in the tulip browser.

We also use the Kepserver for other connection, make sure to have the latest version of the connector host.

Another option is to subscribe it with node red and write to machine attribus. The node red opcua client works well with s7 opcua servers.

Hey @Gunnar -

Yeah, in Tulip you will see the opcua structure, but the unsupported data types will not be rendered. We list compatible OPCUA types in the kb here:

Siements implements odd data types that we cannot easily support. This is a known issues of the library that we implement for OPC UA (example). Node-Red is probably the lowest overhead way to get this running today.

Pete

Is it possible to Write a value to an OPC UA server from Tulip ?
Is it possible to Write to an MQTT Broker ?

thanks

Hi @MosheSabag, thanks for the question and welcome to the community!

As of r285/LTS13, you will be able to write to an MQTT broker. You can find the documentation here, and some more context in the release announcements here.

Right now, we only allow ingestion of OPC UA data, but write is coming soon. More about OPC UA is here, and MQTT connectors here.

Let us know if you have any more questions!

2 Likes

Thanks for the quick feedback John.
Looking forward to the news on OPC UA write option to be included. It will help a lot with real time integrations to the shop floor equipment.
With that, I would like to also suggest - if the connector will be OPC UA server failover aware (adding a backup OPC server endpoint config. option in the connector settings) it will enhance the robustness of the data acquisition substantially.

Thanks

1 Like

Hey @MosheSabag -

This is great feedback re:reduncancy. I have added you note to the discovery document that we have ongoing for this work.

Pete

1 Like