Connect python to PLC

Hello guys,

I have project to monitoring some PLC, so I need to access the sensor, actuator and timer from the PLC.
Hence, I would like to ask you, anyone even tried to access (read and write) data from PLC by using python?
Do you know what kind of library that I can use? Or you have any suggestion for me?
Thank you in advance

Hi Ahmad,

What have you tried? Should we start at the basics like:

google for "Python PLC"

or have you already done that?

gives me some links and projects but I have no idea which ones you’ve
already seen. There are at least four projects for PLCs but I have no
way of judging how complete or usable they are.

  • pyads
  • python-snap7
  • pycomm
  • allen-bradley-toolkit

You should probably check out MicroPython as well.

Hello Steven,

Thank you for answering my question.
I have tried to search on google, but I cannot find the answer that I want.
Thank you for your suggestion about the library, I will try it.
Maybe if you have any tutorial, please let me know.
Thank you in advance

Jonas Neubert gave a talk about PLCs and Python at PyCon 2019, might be useful.

Hello Simon,

Thank you for the video, it is very helpful for me