<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Modbus RTU with the Monarco HAT on Raspberry Pi]]></title><description><![CDATA[<p dir="auto">Monarco HAT MCU (microcontroller) is connected as UART device on the Raspberry Pi <strong>UART-0</strong> (<em>/dev/ttyAMA0</em>). Data on this interface is normally forwarded between Monarco HAT RS-485 and Raspberry Pi UART-0 in both directions with correct buffering for half-duplex operation.</p>
<p dir="auto">The configuration of the RS-485 bus on the Monarco HAT consists of two parts:</p>
<ul>
<li>Configuration of internal UART communication between the Raspberry Pi and the MCU of the Monarco HAT.</li>
<li>Configuration of the external RS-485 communication interface.<br />
<img src="/assets/uploads/files/1551274671199-monarco-hat-rs485-resized.png" alt="0_1551274669761_Monarco-HAT-RS485.png" class=" img-fluid img-markdown" /></li>
</ul>
<h1>Internal UART communication (host side communication)</h1>
<p dir="auto">By default, the Monarco HAT MCU expects UART communication with 115200 Baud, 8 data bits, no parity, 1 stop bit. Therefore it is necessary to use these settings in Modbus Configuration dialog:</p>
<p dir="auto"><img src="/assets/uploads/files/1551277895812-2b6b3a35-e595-458f-9eb0-8042cad4a8e3-image-resized.png" alt="0_1551277894499_2b6b3a35-e595-458f-9eb0-8042cad4a8e3-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><em>Note: It is typically not necessary to change the internal communication baudrate. If needed, it's possible using the 0x012 service register of the Monarco HAT (see the <a href="https://github.com/monarco/monarco-hat-documentation/blob/master/Monarco_HAT_SPI_Protocol.md">Monarco HAT SPI Protocol Reference Manual</a> for details).</em></p>
<p dir="auto">For more details about Modbus driver in REXYGEN see <a href="https://www.rexygen.com/doc/ENGLISH/MANUALS/MbDrv/MbDrv_ENG.html">MbDrv - Driver for Modbus Communication</a>.</p>
<h1>External RS-485 interface</h1>
<p dir="auto">The external RS-485 bus can be fully configured by Monarco Driver Configuration dialog in REXYGEN Studio.</p>
<ol>
<li>
<p dir="auto">Doubleclick MNR function block in your EXEC file:<br />
<img src="/assets/uploads/files/1551275770176-myproject_iocfg_monarco.png" alt="0_1551275768750_myproject_iocfg_monarco.png" class=" img-fluid img-markdown" /></p>
</li>
<li>
<p dir="auto">Click "<strong>Configure</strong>" and set RS-485 bus parameters:<br />
<img src="/assets/uploads/files/1551275850953-monarcodrv_dialog.png" alt="0_1551275849549_monarcodrv_dialog.png" class=" img-fluid img-markdown" /></p>
</li>
</ol>
<p dir="auto">Default parameters are: 9600 Baud, no parity, 1 stop bit.</p>
<p dir="auto">For more details about MonarcoDrv see <a href="https://www.rexygen.com/doc/ENGLISH/MANUALS/MonarcoDrv/MonarcoDrv_ENG.html">MonarcoDrv - Driver for Monarco HAT</a>.<br />
For more details about Monarco HAT see <a href="https://support.monarco.io">Monarco HAT Knowledge Base</a>.</p>
]]></description><link>https://forum.rexygen.com/topic/11/modbus-rtu-with-the-monarco-hat-on-raspberry-pi</link><generator>RSS for Node</generator><lastBuildDate>Sat, 14 Mar 2026 09:13:11 GMT</lastBuildDate><atom:link href="https://forum.rexygen.com/topic/11.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 27 Feb 2019 14:03:29 GMT</pubDate><ttl>60</ttl></channel></rss>