I want to create an application: a testing application which checks a DUT for anomalies for example: the python script checks if the DUT has the proper Serial number etc.
I want to use Codesys visualization manager to build the GUI and I want to use python to run the tests on the DUT.
In the end, imagine a GUI done with codesys but when a button is clicked a Python script is run which run the Tests.
All of this will be run on a Raspberry pi through the Raspberrypi MC SL runtime for codesys.
Could someone please tell me if sucha thing has been done or if it is doable or if it takes way too much time and if i should use PyQT or Tkinter python GUI libraries to make the GUI.
Any suggestion and help is greatly appreciated
Viele GrΓΌΓe
Sebastian Herrman
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
One solution to make CodeSys and Python to exchange data could be to use a Shared Memory (see this example).
This allows you to dedicate a space in the memory where both Codesys and Python are able to read/write.
You can also use the OPCUA functionnality of CodeSys to Exchange data if you want, but I have not tried it yet.
However if you just use CodeSys for building the interface I think it would be easier to go full python.
Hope this helps,
BR
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You could possibly write the value(s) out to a CSV file and have your python code run it. You can execute python via Sysprocess.SysProcessExecuteCommand. So when you click this button, write values out to a file, and also execute python code that you can read back in the result to be displayed on the screen or something.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello all,
I want to create an application: a testing application which checks a DUT for anomalies for example: the python script checks if the DUT has the proper Serial number etc.
I want to use Codesys visualization manager to build the GUI and I want to use python to run the tests on the DUT.
In the end, imagine a GUI done with codesys but when a button is clicked a Python script is run which run the Tests.
All of this will be run on a Raspberry pi through the Raspberrypi MC SL runtime for codesys.
Could someone please tell me if sucha thing has been done or if it is doable or if it takes way too much time and if i should use PyQT or Tkinter python GUI libraries to make the GUI.
Any suggestion and help is greatly appreciated
Viele GrΓΌΓe
Sebastian Herrman
Hello,
One solution to make CodeSys and Python to exchange data could be to use a Shared Memory (see this example).
This allows you to dedicate a space in the memory where both Codesys and Python are able to read/write.
You can also use the OPCUA functionnality of CodeSys to Exchange data if you want, but I have not tried it yet.
However if you just use CodeSys for building the interface I think it would be easier to go full python.
Hope this helps,
BR
You could possibly write the value(s) out to a CSV file and have your python code run it. You can execute python via Sysprocess.SysProcessExecuteCommand. So when you click this button, write values out to a file, and also execute python code that you can read back in the result to be displayed on the screen or something.