bertmelis / esp32ModbusRTU

modbus RTU client for ESP32
MIT License
70 stars 44 forks source link

example to MultiHoldingRegister #13

Open linhartjar opened 4 years ago

linhartjar commented 4 years ago

It is possible to write an example to MultiHoldingRegister, it reports me an error.

EmanueleFeola commented 3 years ago

I used it like this and it works. What error do you get? uint8_t buf[4] = {getHigh(qSetPoint), getLow(qSetPoint), 0, modbusWatchdog}; modbus.writeMultHoldingRegisters(SLAVE_ID, Q_CUR_SETPOINT_ADDR, 2, buf);