-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The maximum number of supported Modbus functions is too short (IDFGH-10913) #34
Comments
Hi fj0207, Thank you for the issue. The current stack supports only the standard commands. The change of the MB_FUNC_HANDLERS_MAX to configurable value will not allow you to add your custom command. The custom function handler should be registered appropriately with specific API call. This functionality is not supported in stack v1.x.x because it is hard to support and track all related user issues later. However, it is planned to add this functionality later. |
Yes, indeed. |
This sounds good to me. I don't think it is good solution to make the function public. The external API interface will not be changed in this version of stack but the internal freemodbus API designed to be isolated from user application by upper modbus controller layer. Please consider this change as a private update for now. |
The maximum number of supported Modbus functions MB_FUNC_HANDLERS_MAX is actually set to 16 and cannot be changed by configuration variable.
However Modbus specifications allow to define 19 user-defined functions in addition to the basic modbus functions.
MB_FUNC_HANDLERS_MAX should be increased or at least configurable. Using SDK config.
The text was updated successfully, but these errors were encountered: