Hi,
I need to Read/Write variables from Codesys to runing python script. I tested example OPCUA where is changing iConunter variable in Codesys project and the value of iCounter is printed by means of OPC UA client "simpleclientRaspi.py". It works well. But I don't need print it I need to use this value in my python script. How can I extract value of iCounter variable?
Peter
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have facing the same issue. Would you like to please elaborate how did you do that?As I am new to CODESYS couldn't find the right option yet.
Thank you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I need to Read/Write variables from Codesys to runing python script. I tested example OPCUA where is changing iConunter variable in Codesys project and the value of iCounter is printed by means of OPC UA client "simpleclientRaspi.py". It works well. But I don't need print it I need to use this value in my python script. How can I extract value of iCounter variable?
Peter
I found the right function. It this example it is possible to use : iCounter.get_value()
Peter
Hi,
I have facing the same issue. Would you like to please elaborate how did you do that?As I am new to CODESYS couldn't find the right option yet.
Thank you.
See also:
https://help.codesys.com/webapp/_cds_access_cds_func_in_python_scripts;product=codesys;version=3.5.15.0#example-reading-of-variables