Modbus RTU with RS485 Shield V2.1 linksprite

good morning

In my project I try to make a modbus rtu communication between two arduino uno (master / slave) and use the RS485 shield v2.1 linksprite.

but the problem I found different modbus libraryas as<ModbuRtu.h> and <SimpleModbus.h>

j’ai essayer avec <ModbuRtu.h> et ceci le code:

Code master:

#include <ModbusRtu.h>

// data array for modbus network sharing
uint16_t au16data[16];
uint8_t u8state;

/**
 *  Modbus object declaration
 *  u8id : node id = 0 for master, = 1..247 for slave
 *  u8serno : serial port (use 0 for Serial)
 *  u8txenpin : 0 for RS-232 and USB-FTDI 
 *               or any pin number > 1 for RS-485
 */
Modbus master(0,0,2); // this is master and RS-232 or USB-FTDI

/**
 * This is an structe which contains a query to an slave device
 */
modbus_t telegram;

unsigned long u32wait;

void setup() {
   
  
  master.begin( 19200 ); // baud-rate at 19200
  master.setTimeOut( 2000 ); // if there is no answer in 2000 ms, roll over
  u32wait = millis() + 1000;
  u8state = 0; 
 
  int cbon=0;
}

void loop() {
   Serial.println("master.getInCnt()");
  Serial.println(master.getInCnt());
  Serial.println("master.getOutCnt()");
   Serial.println(master.getOutCnt());
   Serial.println(master.getState ());
    Serial.println(master.getLastError());
    Serial.println(telegram.u8id);

 
  switch( u8state ) {
  case 0: 
    if (millis() > u32wait) u8state++; // wait state
    break;
  case 1: 
    telegram.u8id = 2; // slave address
    telegram.u8fct = 3; // function code (this one is registers read)
    telegram.u16RegAdd = 1; // start address in slave
    telegram.u16CoilsNo = 15; // number of elements (coils or registers) to read
    telegram.au16reg = au16data; // pointer to a memory array in the Arduino

    master.query( telegram ); // send query (only once)
    u8state++;
      Serial.println(au16data[16]);
      
    break;
  case 2:
    master.poll(); // check incoming messages
    if (master.getState() == COM_IDLE) {
      u8state = 0;
      u32wait = millis() + 100; 
    }
    break;
  }
}

code slave

#include <ModbusRtu.h>

// data array for modbus network sharing
uint16_t au16data[16] = {
  3, 1415, 9265, 4, 2, 7182, 28182, 8, 0, 0, 0, 0, 0, 0, 1, -1 };

/**
 *  Modbus object declaration
 *  u8id : node id = 0 for master, = 1..247 for slave
 *  u8serno : serial port (use 0 for Serial)
 *  u8txenpin : 0 for RS-232 and USB-FTDI 
 *               or any pin number > 1 for RS-485
 */
Modbus slave(2,0,2); // this is slave @1 and RS-232 or USB-FTDI

void setup() {
  slave.begin( 19200 ); // baud-rate at 19200
}

void loop() {
  
  Serial.println(slave.getInCnt());
    Serial.println(slave.getOutCnt());
    Serial.println(slave.getLastError());
  slave.poll( au16data, 16 );
}

the master sends the frame but no response from the slave

Can you help me to succeed in this project