need to help for MODBUS PROTOCOL VIA RS485

hello every one

im newbie . excuse me for bad english .

i wanted to make a MODBUS RTU based connection between two arduino via RS485 standard . i can see many library such as rtumodbus.h or simplemodbus.h or modbus.h or so on . what i want to make is reading analog volage from a analog pin and then send it via RS485 to the othe arduino and show on serial monitor

could you please give me a simple and short codes for master and slave? which library should i use ?

i want you the latest version of library that can fit to standard devices that may be have not arduino inside it

thanks for your help .

Thanks for your quick reply ...

no i dont want to have a complete written program . i only want to know if which one of library of modbus is working properly ? because i saw 3 or 4 type of library at least with the same use for MODBUS .

and if is pssibble i want to see a very simple(even not related to my need) in order to being familisr with commands . or have a total view on it

To my knowledge there is no complete implementation of the ModBus standard for the Arduino. Each implementation has some drawbacks but most work well in their corresponding niche.

I use ModbusRtu.h in my projects (a slightly enhanced version of it to be honest) and one of the biggest advantages of this library is that it provides both master and slave functionality in one library. It has examples of how to use it, if there are additional problems, post your code and we try to help you.

Look at the examples which come with each library. You should find one which does exactly what you want since your requirements are so simple.

Use that library.