I was studying the library, and found out that the modbus_read_bits function, maps each bit read on an entire byte.
This is a bit cumbersome when reading 2000 coils, since it will require 2000 bytes to be preallocated instead of 250.
Is there any way to use this function and get the bits grouped?
I think an alternative is to use modbus_send_raw_request and modbus_receive_confirmation, but from the documentation I read that they must be used for debugging purposes.
Hello everyone,
I was studying the library, and found out that the modbus_read_bits function, maps each bit read on an entire byte. This is a bit cumbersome when reading 2000 coils, since it will require 2000 bytes to be preallocated instead of 250.
Is there any way to use this function and get the bits grouped? I think an alternative is to use modbus_send_raw_request and modbus_receive_confirmation, but from the documentation I read that they must be used for debugging purposes.
Any help would be appreciated. Thanks!