rabaggett - 2024-05-09

I have a Python program that will handle things in my application such as VISA over IP and Telnet control of instruments.

I want the main control and HMI in Codesys.

My problem is communication between the two. I have looked at several ways to accomplish this, and settled on having the Python program create two named pipes, one to send information to Codesys, and one for Codesys to send information to Python. The information would be packetized with \n for end of packet.. Seems simple.

I think the named pipes method should work, but file reading in Codesys using the CAA file library starts to get difficult when the file is never ending, as in this case. Before I spend too much time making something that may be fundamentally flawed I want to ask.

Is there a better way?

Is there a way to read the file 'one line at a time' which might solve my never ending file problem?

Thanks!