Best Python Libraries for CompactLogix PLC Projects on Raspberry Pi

Question:

Hello everyone, I have extensive experience in PLC programming and have recently delved into using Python for my projects. One of my latest endeavors involved utilizing an SQL database to log various data from a Siemens PLC, with the help of the Snap7 library. Now, I aim to replicate this setup with a CompactLogix PLC, but I am faced with multiple library options such as libplctag, pycomm3, and dmroeder/pylogix. There may also be other libraries available that I am not yet familiar with. As I plan to run this project on a Raspberry Pi, it is essential for me to choose a library that is compatible with Linux and ARM architectures. I encountered some challenges with recompiling binaries and tweaking settings to make the Snap7 library work on an ARM processor, so I am seeking advice on which library to proceed with for a smoother implementation. Any insights or experiences shared would be greatly appreciated. Thank you for your help. Kevin

Top Replies

If you need assistance with pylogix, feel free to reach out as I have expertise in this area.

dmroeder advises using pylogix without bias. Unfortunately, limited assistance can be provided.

dmroeder mentioned a strong preference for pylogix. If you have any questions or need assistance, feel free to reach out. What specific features or aspects do you appreciate or find lacking in pylogix that contribute to your bias towards it?

Kevilay inquired about your preference for Pylogix. Can you provide feedback on its pros and cons? Upon visiting the library's Github page (https://github.com/dmroeder/pylogix), did you notice any resemblances between the author's name, avatar picture, and the commenter on this forum? Explore the similarities for a deeper insight.

When you visit the library's Github page at https://github.com/dmroeder/pylogix, do you observe any resemblances between the author's name, avatar picture, and the commenter's avatar on this forum? It's quite intriguing!

Hi Kevin, I'd recommend looking into dmroeder/pylogix. It's Python-based and has wide support for various PLCs, including CompactLogix. One major upside to pylogix is that it doesn't strictly require any binaries to work, which would simplify things when working with different architectures, like your Raspberry Pi. However, there's no escaping some form of configuration, so be prepared to do a bit of footwork to get things up and running. I've got a Pi running just fine with CompactLogix L18 using pylogix, so I'd say give it a shot for your project. Best of luck!

Hi Kevin, I've had a successful experience with dmroeder/pylogix on Raspberry Pi which does support Linux. It's lightweight, actively maintained, and easy to get up and running. It uses Ethernet/IP and there's no need to recompile anything. For handling CompactLogix, ControlLogix and Micro800 series PLCs, it has been flawless in my experience. So, if your setup allows Ethernet/IP, this might be your best shot. However, if you do need to go Modbus for some reason, libplctag is also a solid option but it may require a little more work to implement. All the best!

Hi Kevin, I suggest you give pycomm3 a try. It's a very adaptable library and is designed primarily for the Raspberry Pi, thus it perfectly matches your criteria. From my personal experience, it has a straightforward interface and is reliably consistent. I have utilized it in a multitude of PLC projects with no major issues. Another strong advantage of pycomm3 is that it's Pythonic, so if you're comfortable with Python, you will find it easy and intuitive to use. Remember that your choice ultimately depends on your specific project needs, but based on what you've detailed, Pycomm3 seems suitable. Good luck!

Hi Kevin, based on my own experiences, I would suggest looking into using libplctag for your project. It's compatible with both Linux and ARM architectures, which checks off your specific requirements. Plus, it supports multiple PLC platforms including CompactLogix. I've found it to be very reliable and robust, and the API is quite consistent which should make your work easier. I did not encounter any major issues when I used this on a Raspberry Pi. And, one more advantage, it has a quite active community to help you out online if you face any problems. Good luck with your project!

Hey Kevin! It sounds like an exciting project you’re diving into! Based on your needs, I’d recommend trying out `pycomm3` as it tends to have good support for CompactLogix PLCs and is known for being user-friendly. It’s also compatible with ARM architectures, which should streamline your setup on the Raspberry Pi. A few users have shared positive experiences with it in similar contexts, so it might save you some headaches compared to the others. Definitely check out the documentation, and good luck with your implementation!

Hey Kevin! It's great to hear about your transition into Python and your projects with PLCs. For your CompactLogix setup, I’d recommend giving `pycomm3` a try; it's designed to work well with both CompactLogix and ControlLogix systems and has solid support for Linux. Many users have found it straightforward to implement on Raspberry Pi without the hassle of recompilation. Plus, it seems to have an active community, which could be helpful as you work through any challenges. Good luck with your project, and I’d love to hear how it goes!

More Replies →

Streamline Your Asset Management
See How Oxmaint Works!!

✅   Work Order Management

✅   Asset Tracking

✅   Preventive Maintenance

✅   Inspection Report

We have received your information. We will share Schedule Demo details on your Mail Id.

You must be a registered user to add a comment. If you've already registered,
sign in. Otherwise, register and sign in.

Frequently Asked Questions (FAQ)

FAQ: 1. What are the best Python libraries for CompactLogix PLC projects on Raspberry Pi?

Answer: - The discussed libraries for CompactLogix PLC projects on Raspberry Pi include libplctag, pycomm3, and dmroeder/pylogix. These libraries offer different features and compatibility with Linux and ARM architectures.

FAQ: 2. How can I choose a library that is compatible with Linux and ARM architectures for my CompactLogix PLC project on Raspberry Pi?

Answer: - It is essential to consider compatibility with Linux and ARM architectures when selecting a library for your project. Some libraries may require recompiling binaries and tweaking settings to work on an ARM processor, so it is advisable to research and choose a library that offers smoother implementation on Raspberry Pi.

FAQ: 3. Which library is recommended for logging data from a CompactLogix PLC using Python on a Raspberry Pi?

Answer: - The Snap7 library was mentioned for logging data from a Siemens PLC, but for CompactLogix PLC projects on Raspberry Pi, alternatives such as libplctag, pycomm3, and dmroeder/pylogix are available. It is recommended to explore these options based on your specific project requirements and compatibility with Raspberry Pi.

Ready to Simplify Maintenance?

Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.

Request Demo  â†’