Passing a method call from a Python OPC-UA server to the PLC environment via the DataLayer

Hi together,
I am still new to the ctrlX system and am currently working with the SDK.

My problem is as follows:
I have programmed an OPC-UA server in Python.
With the help of the examples I was able to add nodes to the datalayer via Python and transfer the variables of the OPC-UA server there.
Now I want to bring my OPC-UA methods to the data layer so that I can pass on a method call to the PLC.

Unfortunately, I have not found any examples for attaching methods to the datalayer.

Is there a way to implement this concept?

 

Thanks in advance!

 

 

Best reply by nickH

Hello Thomas, 

at the moment it is not possible to get methods from the PLC to the Data Layer, like you can do it with custom apps in high level programming languages. 

I think the best workaround for you would be to have a bool variable in your PLC project and publish them to the Data Layer. From the Python App you can set the bool to true, when you want to start your PLC function. In the PLC program you can start your function when the specific bool variable is true and set the variable back to false, if you have finished the function (see screenshot and link in further information). 

To publish PLC methods direct to the Data Layer would be a nicer solution. This feature is on the roadmap for a future release.

Further information: 

View original
4 replies