Skip to content
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

[TW#28143] Make MB_INST_MAX_SIZE configurable in menuconfig #2884

Closed
keelung-yang opened this issue Dec 25, 2018 · 3 comments
Closed

[TW#28143] Make MB_INST_MAX_SIZE configurable in menuconfig #2884

keelung-yang opened this issue Dec 25, 2018 · 3 comments

Comments

@keelung-yang
Copy link

Our applications depended on modbus heavily. But MB_INST_MAX_SIZE (2048) is too small.
I know I can change it, but thus make esp-idf dirty locally. So it's better to make it configurable.
Lucky, a few code should be changed:

image

@Alvin1Zhang Alvin1Zhang changed the title Make MB_INST_MAX_SIZE configurable in menuconfig [TW#28143] Make MB_INST_MAX_SIZE configurable in menuconfig Dec 26, 2018
@alisitsyn
Copy link
Collaborator

@keelung-yang,

Thank you for your advice.
Many Modbus software drivers (for Master PCs) were written with the 1 to 9999 register limits and cannot access extended registers in slave devices. Many slave devices do not support maps using the extended registers. The existing instance size limit in Modbus controller is not enough and it was changed to be configurable in KConfig. Does the instance limit = 65535 bytes looks reasonable for you?

The Modbus controller code has been updated and will be merged as soon as possible.

@keelung-yang
Copy link
Author

@alisitsyn Thanks for your reply!
Yep, the instance limit = 65535 bytes looks reasonable, since 8 * 1024 is used currently in our application, and maybe extend it to 12 * 1024 (=12288 < 9999*2 = 19998) after several years.

@alisitsyn
Copy link
Collaborator

@keelung-yang, In updated realization the MB_INST_MAX_SIZE is predefined to maximum value (65535 * 2) and removed from KConfig. It is responsibility of user to control range of register areas .

igrr pushed a commit that referenced this issue Jan 11, 2019
esp-idf/components/freemodbus/modbus_controller/modbus_controller.c: The MB_INST_MAX_SIZE is changed to max value=(65535*2);
Update support for coils read into freemodbus.c;

TW#28143
Closes #2884
espressif-bot pushed a commit to espressif/esp-modbus that referenced this issue Apr 5, 2022
esp-idf/components/freemodbus/modbus_controller/modbus_controller.c: The MB_INST_MAX_SIZE is changed to max value=(65535*2);
Update support for coils read into freemodbus.c;

TW#28143
Closes espressif/esp-idf#2884


* Original commit: espressif/esp-idf@e3a786f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants