I am trying to extract data from programmable logic controller's registers using Raspberry PI module and then display it on screen. I have installed pymodbus package on my Rpi. I am quite unsure how to proceed further.

1 Answer 1


You need to read the documenation for the package. Unlike some packages you'll encounter, http://pymodbus.readthedocs.io/en/latest/ is REALLY well documented. You'll need to ascertain the location and types of your registers. Did you code the PLC, or do you have the documentation for the logic which is contained? Armed with this information, look at one of the creators four frontend examples. If that's not enough, look at one of the twelve user-supplied examples. I'd recommend "modbus scraper", but it;s a serial port example. It does give examples of all the calls you'll need. The single server example should show you how to make the TCP/IP connection.

  • Thanks a lot KDM. I really new into this, can you suggest me some websitre where I can look into the basics Modbus protocol terminologies, because I am not understanding those examples clearly.
    – Sahan
    May 18, 2016 at 8:13
  • The modbus spec is long. If you dropped it on your foot, you'd break your toe. First, you need a sort of "taster". Google it. I would go to simplymodbus.ca/FAQ.htm. Don't be intimidated by the large index: everything you need is right there on the one page. If you know the basics about computing, micros, hexadecimal, etc. then you can discard half of it.
    – KDM
    May 18, 2016 at 20:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.