I’m using an ESP32-P4 and the library ModbusMaster to communicate with a Modbus device.
But I’m facing a curious behavior of the library.
The program needs 13 seconds to collect all the data needed over modbus. And obviously that too long to wait.
At first, I thought there were too much requests, but it’s only about 150 readings of holding registers. That results 300bytes of data as response. That’s nothing, especially at a baud rate of 115200.
What is going on?
Have you the same poor performances as I do with this ModbusMaster library?
If you don't post sufficient information, no-one can answer.
I doubt that the library is pushing a brake pedal, so the reason is likely something else.
How are you making the requests for 150 registers?
Modbus protocol limits the nro of registers to 125 in one request.
Modbusmaster library has default response buffer of 64. You can increase it though...