Repository navigation
Replies: 2 comments 2 replies
|
According to the documentation, certain assumptions are made but not really explained, and I couldn’t find any clear reasoning for why this limitation is necessary in the API.
Such implicit rules further restrict how the API can be used and unnecessarily limit developers in dynamic scenarios. |
|
The description of dynamic device descovery algorithm (will be updated): The Modbus master communication session:Let us assume that devices will contain, for example, two physical parameters to read (humidity and temperature), but the mapping of these parameters depends on the device manual and is different. Assumptions and dependencies:Before the start of the session, the master must know all possible supported slaves that will be connected and handled during the communication session. This is regular Modbus workflow; otherwise, the master cannot communicate correctly with the slaves. The supported slave devices may not appear on the bus when the master starts the session and can be detected during discovery. However, the mapping table of supported slaves must be known. The discovery algorithm will be used to detect the slaves that are connected to the bus in the scope of addresses using their UID. Serial discovery algorithm:
Similar approach can be used to form the device description from the json format as example and create the table for each device on the fly then start polling. The descriptor changes shall be protected with critical section as described above. For the TCP device discovery it is possible to use the delegate name
A little modifications of the discovery and polling algorithm are possible:
|
Uh oh!
There was an error while loading. Please reload this page.
This discussion aims to explore possible improvements to the esp-modbus master descriptor system to make it more dynamic, flexible, and configurable at runtime, while maintaining backward compatibility as much as possible.
Currently, the Modbus master stack requires the parameter descriptor table to be defined before the controller starts. This works well for static configurations, but it limits applications that:
Goals of this discussion:
The goal is not to change the primary Modbus master workflow, but to extend it safely for dynamic and memory-sensitive applications.
All reactions