cardosocea
Member
Haha, yeah, you found that one out in real life It's from a movie I like.
Clerks? I think I see Silent Bob in the back.
Haha, yeah, you found that one out in real life It's from a movie I like.
Wow thats a crazy delay. In the siemens library I used. Snap7. It was as close to instant as I could expect. I was turning a bit on with the python program then flipping it off in the plc with a short timer and you would never even see it turn off. The whole process of reading --> writing --> reading would be <50ms
I've only recently started experimenting with using Python libraries with PLC's. I used Pycomm3 to communicate with ComplactLogix PLC. Very straight forward and easy. Documentation good and thorough. I was just reading tags and writing to them, so not doing anything compelling.
One thing I did find though that was odd, possibly just inherent to that library is that when reading just one tag, it would hang for several seconds before finally reading back the tag value. My guess is that the time delay is because it's iterating through all the tags on the controller to find the tag name specified(?). I didn't dig into the underlying code to find out, but just a guess.
Clerks? I think I see Silent Bob in the back.
Close, Clerks was shot black & white. Clerks 2.
You docs and programming examples are excellent. Thank you for all your hard work!
Thanks for the feedback. I added the docs recently, which I feel like I'm terrible at.
When I started learning python, I found that I learned best with simple examples that I could tinker with, to see how they work. Simple, clear examples are sometimes hard to come by, so I had all of that in mind when I added them to the project. I'd end up reading some projects documentation to try to understand how to use it, but it was good examples that really helped me.
Github is usually my first stop for this kind of thing. Maybe summat here? But I'd be surprised if @dmroeder's modbus suggestion does not pan out.
I incorporated pylogix into an application but notice a couple of issues regarding a STRING tag I write to:
1. It is necessary that the PLC receives an updated tag value from my external python application within 400 milliseconds. Every few minutes I will see a 'blip' in communication where it may take much longer than 400ms for the PLC tag to update.
2. If I increase the write rate to ~ <50ms, the string tag in the PLC will lag in updating by about 600ms of time. I believe the PLC receives all the values, but a latency is introduced at this faster rate.
Are there known limitations on read/write rates? And can pylogix be used to read/write in a deterministic fashion or at a set RPI consistently? Are there network card optimizations recommended to improve read/write rates?
Thank you for your time.