here i copuldnt find the pin number on which tx, rx pin is cxonnected, however de/re pin is mentiond there
Also does this library needs HARDWARE SERIAL ONMLY, can we run it using software serial ?
Can u please help me finding where is the exact implementation of transmitting and receiving data as i couldnt find it either in modbus / rs485 blibrary.
As a note for the forum helpers, I'll explain that by "this library", @sunilkumar55 is referring to "ArduinoModbus" (I happen to have the missing context since I triaged @sunilkumar55's issue in that repository):
Which Uno are you referring to specifically? Arduino has manufactured multiple boards that contain "Uno" in their name, each of which have significant relevant technical differences:
Since it is the most common, I'll proceed to answer on the assumption you mean Uno R3 (or any of the other ATmega328P-based boards):
Arduino does not provide official support for using this library on the Uno R3. The reason was explained by a developer when the decision was made to do so:
This is imho necessary since even one of our own examples does not link anymore, due to the required memory exceeding the available ressources of the ATMEGA328P based Arduino Nano.
So the reason is not that there is some known technical incompatibility between the library and the Uno R3, but instead that Modbus applications tend to require a significant amount of memory and the AVR boards like the Uno R3 have limited amounts of memory.
So the answer to your question is: "it is probably compatible, but there are no guarantees".
Or in other words: 1 and 0
At this time, it is hardcoded to use the primary hardware serial object. The request for addition of the capability for an arbitrary Stream object to the library is tracked by the developers here:
I'm not able to provide assistance with that. Hopefully one of the other forum members will be able to help.
I believe that the general approach to Modbus RTU using an Arduino UNO is to use a software serial port and the ModbusMaster library which you should be able to install via the library manager.