Reading uint32 holding registers
mauricemullens opened this issue · comments
Using the examples in TCP ESP32 i can't find an example to read multiple hreg in one call and receive an array back?
mb.readHreg(remote, REG, &res); is just giving me one value back, which is fine, but i tried using mb.readHreg(remote, 32260, &res, 2, NULL, 17), which should give me two uint16 values, but i only get one. So, how do i iterate? Or do i use another function?
Look here, modbus only works with 16 bit values, if you need to work with 32 bit values or more you must split those values.
Here are examples of how it can be done, both on the client side and on the server side.
Data Conversion
Here is the thread about this talk
##158