Hello everyone,
I have an application that requires both Codesys and Python to access the same file. At the moment, I am using a USB, which works.
However, I would like to explore the possibility of without a USB by creating a shared folder in CEPE. I tried creating several folders with root access, but none of them are readable by the app.
Any suggestions would be appreciated!
Hi Zingchen,
Thank you for your request. To be sure I am understanding it correctly: You are succesfully editing one file from Codesys and PYthon at the same time, when the file is saved in the USB, but if you want to save the file in the CEPE, you can not access it anymore. Right?
If you desire to exchange information in between the Apps, using the GDS would be much easier and faster. Is that a viable option?
That’s right, when the file is saved in the USB, I am able to access it both from Codesys and Python. However, I want to remove the use of USB and store the file in CEPE but I couldn’t make the folder/file accessible by both apps.
I am also using GDS at the same time but I think file access is still required. We are using Python script to read the file and send information back to Codesys. Codesys side is required to determine which file to read via webvisu.
Hi Zingchen,
Thanks for explaining the use case. I understand that the Python script reads a file and sends information to CODESYS, while CODESYS selects the file through WebVisu.
GDS is the official way to exchange data, and you’re already using it. Whether a file can also be shared between Python and CODESYS through CEPE depends on how the applications are running and which storage paths and permissions are available. I can’t confirm that a shared CEPE folder is currently supported, so I wouldn’t want to suggest a path or configuration without verifying it.
*Could you clarify what information needs to be passed through the file, and why that part cannot be handled through GDS? That will help determine whether the file is necessary or whether the data exchange can be simplified.
Yes, I am currently using GDS to exchange information between CODESYS and Python, and that is working well.
My current challenge is that I will need a USB storage for Codesys and Python to access to the file stored inside. However, I would like to eliminate the USB storage and store the files directly on the CEPE instead.
Currently, I couldn’t find a file path that is accessible by both Codesys and Python other than using a USB storage.
Please take note that the files are also dynamic. We will upload or replace files on the CEPE over time so they cannot be hard-coded.
Sorry for the earlier confusion. I hope this better explains the requirement.
Hi,
we checked this internally, and at this time, accessing the same file from both Python and CODESYS using the CEPE’s internal memory is not supported.