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.
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