3.2 Modbus communication via RS-485

The RS-485 bus provides a standard interface to communicate with external devices (servo drives, energy meters, etc.) or to expand the I/O capabilities of the Monarco HAT itself. Modbus communication is typically used. There is a separate driver for Modbus communication in the REX Control System, see [3].

IMPORTANT: Note that the internal communication between the CPU and the MCU of the Monarco HAT uses UART communication (/dev/ttyAMA0 on the Raspberry Pi) at 115200 baudrate, 8 bits per byte, no parity, 1 stop bit. These are the values you have to use in the Modbus driver configuration if you are willing to use it. For details about the internal structure of the Monarco HAT visit http://www.monarco.io.

Figure 3.3 shows an example project main file with multiple I/O drivers.