ModbusMaster icon indicating copy to clipboard operation
ModbusMaster copied to clipboard

hello i can write data but i can't read how can i read data can you help me

Open paxsipornax opened this issue 3 years ago • 1 comments

For example, how can I read the data in the 40001 register, I wrote a code but it didn't work, how can I read the data?

void loop() { static uint32_t i; uint8_t j, result; uint16_t data[6];

result = node.readHoldingRegisters(0x40000, 6);

if (result == node.ku8MBSuccess) { for (j = 0; j < 6; j++) { data[j] = node.getResponseBuffer(j); } }

delay(100); node.writeSingleRegister(0x40000, 1506); delay(100); node.writeSingleRegister(0x40001, 100); delay(100); node.writeSingleRegister(0x40002, data); delay(100);
}

paxsipornax avatar Dec 06 '21 08:12 paxsipornax

i have same issue did u solve?

TheYigidOS avatar Nov 10 '22 20:11 TheYigidOS