ModbusMaster
ModbusMaster copied to clipboard
Share code example read/write multi slave ?
can someone help me?
Dear all, I am also interested in using two (slave) RS485 sensors with a ESP32. Thanks a lot in advance !
Hi, this is how I do it:
void testRead(uint8_t addr) { node.setSlaveID(addr); if (node.readHoldingRegisters(17, 35) == node.ku8MBSuccess) { for (uint8_t j = 0; j < 35; j++) { data[j] = node.getResponseBuffer(j); Serial.print(j); Serial.print(": "); Serial.println(data[j]); } } }
setSlaveID is a function I added from https://github.com/4-20ma/ModbusMaster/pull/111.
Hello friend this is single master and slave We have the log for two device inverter is slave and display is master. Have read payload but this Comunication Gtil2 inverter not Hare modbus? A this link i have shared log https://github.com/cent0/Extend-wired-system-serial-uart-to-wifi/issues/1 Any help for decode this?
https://youtu.be/46qE9sLV13M