I'm about to start a project using Arduino and external motors controlled by RS485. The connection is half duplex (so a 3-wire setup). To be sure of my approach, I have a question:
Can Arduino both write and receive over RS485?
What is then the meaning of Master/Slave in a RS485 setup?
RS485 specifies the hardware and communication voltage levels. Modbus RTU specifies how the software interprets the data. Two different things. Don't get them confused.
You can use Modbus over TTL Serial, Ethernet, RS485, or RS232. Again software versus hardware. Modbus is meant to communicate to multiple devices. TTL Serial, Ethernet, RS485 are meant to connect more than 2 devices devices. RS232 only connects two devices.
There is no such thing as Master/Slave in RS485. However Master/Slave does apply to Modbus. In Modbus, the master sends or requests data. The slave receives data and sends data when requested.
Can Arduino read and write over RS485? Yes, given the correct hardware, hardware interface, and software. The windmill link you provided, also shows a yes to both of your questions.
It must be possible to there would not be a shield to do it.
adwsystems:
Modbus RTU specifies how the software interprets the data. Two different things. Don't get them confused.
Modbus RTU seems an optional layer, is that right? Or this is how Arduino Serial works?
Do I need to worry about Modbus if I just use Serial.print and Serial.available?
The motor can perfectly send and receive commands over RS485. No Master/Slave concept there (sending "ready" string when in position, not by request. Should the Pseudo-code work then?