stephane / libmodbus

A Modbus library for Linux, Mac OS, FreeBSD and Windows
http://libmodbus.org
GNU Lesser General Public License v2.1
3.44k stars 1.75k forks source link

Add function codes for Modbus communication with ebmpapst ventilators #598

Closed Jiriki86 closed 1 year ago

Jiriki86 commented 3 years ago

I work for a company which builds control units for supermarket refrigeration systems. An important part of these systems are ventilators which dissipated the thermal energy extracted from the fridges inside the supermarket. One common brand of ventilators is produced by the ebm-papst company.

https://www.ebmpapst.com/de/en/home.html

The control unit communicates with the ventilators using Modbus-RTU. We decided to use the libmodbus library for that purpose.

Two new function codes have been added to the existing library and the computation of the message lengths has been updated accordingly. This allows for an automated search for ebm-papst ventilators on the Modbus.

cla-bot[bot] commented 3 years ago

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Tobias Weber. This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails
Jiriki86 commented 3 years ago

@cla-bot check

cla-bot[bot] commented 3 years ago

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get yourself added.

cla-bot[bot] commented 3 years ago

The cla-bot has been summoned, and re-checked this pull request!

Jiriki86 commented 3 years ago

@cla-bot check

cla-bot[bot] commented 3 years ago

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get yourself added.

cla-bot[bot] commented 3 years ago

The cla-bot has been summoned, and re-checked this pull request!

Jiriki86 commented 3 years ago

@cla-bot check

cla-bot[bot] commented 3 years ago

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get yourself added.

cla-bot[bot] commented 3 years ago

The cla-bot has been summoned, and re-checked this pull request!

karlp commented 3 years ago

These function codes 0x43 (67) and 0x46 (70) fall into the "user defined" range from 65 to 72, so we couldn't possibly add hardcoded support for this particular usage of those codes by those particular devices. This is another case where the ability to register user handled function codes would provide the solution, see https://github.com/stephane/libmodbus/pull/140 and related issues linked from there.

Jiriki86 commented 3 years ago

@karlp Thank you for pointing out the user-defined range of function codes. It seems I was too naive in my implementation. A more flexible approach is needed. There are two PRs that go in this direction #140 and #522. However, it is not clear to me why they never have been closed. Anything I contribute to change that?

karlp commented 3 years ago

convince @stephane that this problem still persists and that a solution needs to be found eventually, preferably sooner rather than later :)