MODBUS - despite being very old - is a common and widely used protocol in industrial applications for connection sensors, plc's and machines. The MODBUS protocol can be seen as an early client/server protocol, the client (MODBUS master) requests data and the server (MODBUS slave) replies. E.g. for a data reuest, the master specifies the MODBUS register(s) and gets the content of the register(s). There are no semantics defined here.

There are lots of MODBUS software libraries available for different platforms, MODBUS variants (RTU,TCP/IP,...), ...

My goal is to write a software for multiple (standard) industry devices that are talking MODBUS.

My question are:

  • Is there is a global directory of register definitions for MODBUS devices?
  • Is there a software with built-in register definitions for many (thousand, even million) MODBUS devices?

Free (open source) libraries are preferred.

  • While the part asking for the "global directory of register definitions" is off-topic here (Open Data might be a fitting place for that, but please check with the linked page first before asking there), we need a few more details for the "software with built-in register definitions": Which OS should it run on? Any price limit (or do you explicitly exclude payed software – you just wrote "free … preferred")? Considerations towards its license (e.g. "commercial use" vs. "personal use")? – Izzy Mar 17 '16 at 12:39
  • Thanks for the Open Data hint. I opened a similar question there after your comment. For the software I do not prefer any OS, and programming language or the like. Just looking for a (free) repo, library or vendor that has collected MODBUS register specifications. Our purpose is to build a software for arbitrary MODBUS devices. If this software will be open is not fixed right now. – WeSee Mar 17 '16 at 15:07
  • May I suggest you edit your question here then accordingly (removing the "off-topic part", including the details on OS, free, and make it a clear software request (so basically focusing on your second bullet-point)? Might also be useful what programming language the library must fit (or what OS you target; the latter probably obsolete when the former is Java). When done, please ping me again for a comment-cleanup. Thanks, and good luck! – Izzy Mar 17 '16 at 17:44

I have successfully used the Python modbus-tk library for communicating with multiple Mobus devices but there is also a pymodbus library -

Both libraries:

  • are Open Source (LGPL for modbus-tk & BSD for pymodbus)
  • are Cross Platform
  • Support Serial & TCP communications
  • Can act as Master or Slave
  • Are active
  • Support scripting, etc., in python.

The main difference is that modbus-tk has fewer dependencies than pymodbus.

As far as I know there is no global definition of all the different register maps on different devices, in some cases not only do these vary between models of a given manufacturers devices but also with the software release. The good news is that the flexibility of python and especially the power of the python dictionary allows you to cope with this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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