RE: modbusmaster libaray

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

I am using <modbusmaster.h>

For what? Making grilled cheese sandwiches?

Post ALL of your code, and a link to the library, not just its name.

No, for a laser toaster.

<<Old Amiga reference, when VideoTEk was designing its low cost video production hardware/software it claimed it was developing a toaster with a laser that could draw patterns on bread as misdirection. When released they even named it the "Video Toaster" in honor of that.>>

He might have been rude, but he had a valid question, which I notice you did not bother to answer.

Got that sorted out.

Thanks