Arduino UNO R3 + MAX 485 ModBus protocol

Hello, I have an Arduino UNO R3 and a MAX 485 converter.

I want to communicate through modbus protocol. I can connect the setup to my PC via a USB to RS485 Converter.

I tried using the ArduinoModbus library with the Arduino485 library But nothing worked. Can anyone help me?

You need to post your code that you are using on the UNO so we can see it. I think the library generally used with an UNO for Modbus is the ModbusMaster library which can be installed via the library manager in the IDE.

I seem to recall that the libraries that you are using are designed to be use with the MKR range of Arduino boards and the MKR485 module. Check the compatibility details on the page you linked to and you will see that the UNO isn't listed.

With an UNO board, the usual approach is to use a software serial port (there's a library for this too), but note that your comms will be limited to a maximum of around 19200 baud.