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!

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.

To add a comment, please sign in or register if you haven't already..   

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  â†’