ModbusRTU protocol - RS485 - ReadHoldingRegister

Hello everybody!

Im trying to stablish a Modbus RTU communication beetween an arduino (master) and a digital temperature reader (slave). It should be something easy (no so difficult) to do, but Ive already tried lots of libraries and codes without success. I really cant get any solution to my problem, and it makes already about 5 months that Im in this issue!

Would you mind giving me any light? please…
If so, I would be extremely glad and thankful.

I have an arduino Mega connected to a MAX485 module according to the wiring below:

(arduino) (MAX485)
digital PIN 2 (enableTx)<---------> DE e RE
digital PIN 1 (TX) <---------------> DI
digital PIN 0 (RX) <---------------> RO
GND <-----------------------------> GND

The RS485 module is connected to the temperature reader. They have the same GND.

I need do the folowing request through Modbus RTU protocol:

Slave ID: 2.
Address: 0000
Quantity of registers to read: 1

I tried all these libraries:
SimpleModbusMaster (V2 rev2)

What can I do now? I also tried to write my own code at the IDE, but I failed…

Isn`t there any dummy-solution that I could just copy and paste and make everything work, like magic?? =/

Thank you once again for any help that you may give me!

Best regards,

references: (20.2 KB)

SimpleModbusMasterManual.pdf (275 KB) (353 KB) (37.2 KB)

Welcome to the forum Eva, I hope that you will be able to egt some help here now to finally get communications working correctly between the Arduino and temperature module.

Eva wrote:

It should be something easy (no so difficult) to do, but I`ve already tried lots of libraries and codes without success

Yes, it should normally not be difficult. But when you say 'without success', can you detail exactly the problems you were experiencing with the libraries you tried already ?

Please give error messages you had.

Can you provide a link or details to the temperature unit you are trying communicate with?
Also, can you post the actual code you have, say using SimpleModbusMaster library ?

I can imagine after many months with no success it would become frustrating not to have made much progress.