Hi,
I am working with the following code for modbus RTU
static uint32_t i;
uint8_t j, result;
uint16_t data;
result = 01;
// slave: read (1) 16-bit registers starting at register 2 to RX buffer
result = node.readInputRegisters(0x0007, 5);
// do something with data if read is successful
if (result == node.ku8MBSuccess)
{
for(i = 0; i<=10; i++)
{
// data = node.getResponseBuffer(0x0);
Serial.println(node.getResponseBuffer(i));
}
Serial.println("data end");
What does the argument in the getResponseBuffer mean? and how to find it in a PLC device?
I am able to enter the if condition but unable to read the data
I am using <modbusmaster.h>
Kindly help.
Regards.
Sid