RS485 and TUF-2000M

Hi, I am working with the TUF - 2000M and to get some data using RS485 port.
I am using Arduino Mega and RS485 module, Arduino will be the Master and TUF and other devices will be slaves, I chose Mega because of the possibility of multiple Serial ports, and when I tried to get the data through the oscilloscope in UNO, the value Shown on the RO had the dice received and something else unknown to me beside the some caractheres also unknown, already used some libs but i liked the use yhe lib ModbusMaster of GitHub.

this code:

#include <ModbusMaster.h>

/*!
We’re using a MAX485-compatible RS485 Transceiver.
Rx/Tx is hooked up to the hardware serial port at ‘Serial’.
The Data Enable and Receiver Enable pins are hooked up as follows:
*/
#define MAX485_DE 21
#define MAX485_RE_NEG 22

// instantiate ModbusMaster object
ModbusMaster node;

void preTransmission()
{
digitalWrite(MAX485_RE_NEG, 1);
digitalWrite(MAX485_DE, 1);

}

void postTransmission()
{
digitalWrite(MAX485_RE_NEG, 0);
digitalWrite(MAX485_DE, 0);
}

void setup()
{
pinMode(MAX485_RE_NEG, OUTPUT);
pinMode(MAX485_DE, OUTPUT);
// Init in receive mode
digitalWrite(MAX485_RE_NEG, 0);
digitalWrite(MAX485_DE, 0);

// Modbus communication runs at 115200 baud
Serial.begin(9600);
Serial1.begin(9600,SERIAL_8N1);

// Modbus slave ID 1
node.begin(1, Serial1);
// Callbacks allow us to configure the RS485 transceiver correctly
node.preTransmission(preTransmission);
node.postTransmission(postTransmission);
}

void loop()
{
uint8_t result;
uint16_t data[6];
// result = node.writeSingleCoil(0x0002, state);
//state = !state;

result = node.readHoldingRegisters(0x21, 2);

Serial.println(“result”);
Serial.println(result,HEX);

if (result == node.ku8MBSuccess)
{
Serial.print("total flow for month: ");
Serial.println(node.getResponseBuffer(0x00));
// int vetor = (node.getResponseBuffer(0x01)/100.0f);;
// int vetor1 = ((node.getResponseBuffer(0x03)));
// Serial.println(vetor);
// Serial.println(vetor1);

}
delay(5000);
}

the manual of TUF : https://images-na.ssl-images-amazon.com/images/I/91CvZHsNYBL.pdf

the program response is in the attached image

My questions about this answers :

I) Do I have to do any operation on the bits I reach?
II) Is the number of registers manual already in HEXA or DEC?

Thanks for you answers, and sorry for my bad english

First: edit your post and insert code tags!

 // Modbus communication runs at 115200 baud
  Serial.begin(9600);
  Serial1.begin(9600,SERIAL_8N1);

Either the code or the comment is wrong!

I) Do I have to do any operation on the bits I reach?

Yes, most registers are coupled into pairs, you have to read both registers and convert the result accordingly. A good manual would describe that step as there's no Modbus standard type REAL4 or LONG.

II) Is the number of registers manual already in HEXA or DEC?

As they just count up without using characters a-f in the numbers I would expect them to be decimal.
So you read out the inlet temperature I'd say (without the correct transformation).

Thank you for your help,

I) Yes, I forgot to change the baud rate comment,

II) In the manual, this is unclear and I searched this forum and someone talked about reading I3E Stantart (IEEE754), I don't know how this will influence the conversion of binary to decimal, hexa in this case.

In the manual, this is unclear and I searched this forum and someone talked about reading I3E Stantart (IEEE754), I don't know how this will influence the conversion of binary to decimal, hexa in this case.

That just influence how you interpret the values you read from the registers but is absolutely unrelated to the interpretation of the register addresses.