arduino uno reading and data logging from RS485 modbus

I have a arduino uno that I’m trying to log data from a modbus device over RS485

I have a adafruit data logging shield, RS485 shield.

this is my code I’m working with currently

I have not added the data logging code yet.

I need to read 32 bit floating registers and I think I’m only reading 16.

My device is an Accutech BR20 base with three remote sensors
the BR20 sends data through the RS485 using ModBus

The registers are the holding ones in 40000 and should be 10 per sensor

Attached is the data sheet for the Accutech BR20

Please help

#include <ModbusMaster.h>
ModbusMaster node(0,3);

void setup()
{
// initialize Modbus communication baud rate
node.begin(9600);

}

void loop()
{
//wait a sec
delay(1000);

//new code
int val = 0; // declare val and set initial valuevoid loop()

float CSGPSI = val;

static uint32_t i;
uint8_t j, result;
uint16_t data[2];

i++;

// set word 0 of TX buffer to least-significant word of counter (bits 15…0)
node.setTransmitBuffer(1, lowWord(i));

// set word 1 of TX buffer to most-significant word of counter (bits 31…16)
node.setTransmitBuffer(0, highWord(i));

// slave: read (1) 16-bit registers starting at register 4001 to RX buffer
result = node.readHoldingRegisters(40001, 4);

delay(300);

// do something with data if read is successful
if (result == node.ku8MBSuccess)
{
for (j = 0; j < 2; j++)
{
data[j] = node.getResponseBuffer(j);
}
}

//do what ever you want with the message(byte array)
}

ACCUTECH_BR20_DATASHEET___A4.pdf (433 KB)