Looking once again at the issue I can see flaw in our modbus logic.

1. Driver by default assume it is used with single field optimizer, meaning it does not support multiple reads and multiple writes. 2. Despite of above it does assume write multiple coil, even if there is just one bit to be set.

The logic is not that difficult to fix, yet I don't see currently a way we could support odd configurations such as read multi/write single and vice versa. This is something which is not reflected currently by API which does not let user to pick optimizer or change it at runtime. On other hand changing field syntax for that will require updates to all languages.

Soeren, can you create a bug/feature request describing your issue? This way it will not fade over time.

Best,
Łukasz

On 08.10.2021 06:28, Niclas Hedhman wrote:
On 2021-10-07 23:33, Łukasz Dywicki wrote:
As
far I know Murphy's law we will then find devices which require write
multiple even for single register. ;-)

I can confirm that I have come across that too, and pretty sure it applies to both reads and writes. One could argue that such devices are not compliant, but since there is no strong certification and everyone claiming "Modbus protocol", I think it is something that needs to be handled.

Cheers
Niclas

Reply via email to