Skip to content

Modbus RTU on Arduino: MPINO as a Protocol-Native Field Device

Modbus RTU is the lingua franca of industrial serial communication, and MPINO controllers speak it natively through the ILIB library. Whether you need an MPINO-8A8R-S acting as a slave under a SCADA poll or an MPINO-16A8R orchestrating a network as master, the protocol layer maps directly onto coils, discrete inputs and registers.

Master and Slave Roles with ILIB

Modbus RTU defines a strict request-response transaction between one master and one or more slaves. An MPINO controller can take either role. As a slave, the unit exposes its physical I/O as a Modbus register map and answers function-code requests from an HMI, SCADA package or PLC. As a master, it initiates transactions, polling other field devices and writing setpoints to them on a schedule you define in your sketch.

The ILIB library handles the protocol mechanics so your application code works in terms of meaning rather than bytes. It frames messages, manages the slave address, validates the CRC-16 on every frame, and enforces the inter-character and inter-frame timing that distinguishes RTU from ASCII mode. On an RS-485-equipped unit such as the MPINO-8A8R-S or MPINO-16A16R, this lets a single controller participate as an addressable node on a shared bus with no external protocol converter.

The role you assign each MPINO follows the architecture rather than the hardware, since the same controller can be configured either way. A common pattern places one ATmega2560-based MPINO-16A8R as the master at the head of a line, polling a string of slaves and concentrating their data, while compact ATmega128-based units such as the MPINO-8A8R-S sit downstream as slaves close to the equipment they control. Because the protocol layer is identical regardless of role, you can repurpose a node from slave to master, or move the master function to a different controller, without rewriting the application logic that drives the local I/O.

Mapping MPINO I/O to the Modbus Register Model

Modbus organises data into four primary tables: coils (read/write bits), discrete inputs (read-only bits), holding registers (read/write words) and input registers (read-only words). MPINO I/O slots cleanly into this model. Relay and transistor outputs are naturally exposed as coils, so a master can command an MPINO-8A8T-S to switch any of its 8 transistor outputs by writing a single coil. Opto-isolated digital inputs become discrete inputs that the master reads to learn field status.

Analog data uses the register tables. The analog inputs and NTC temperature channels of an MPINO-8A8R-S are presented as input registers, returning measured values to the master, while configuration parameters and setpoints live in holding registers that the master can write. On an MPINO-16A8R8T, the 2 analog outputs are mapped to holding registers as well, so a supervisory system can command a proportional output simply by writing a word to the correct register address. Documenting this register map is the contract between the MPINO device and everything that talks to it.

Integrating with HMI and SCADA Systems

Because MPINO controllers present a standard Modbus RTU register map, they integrate with HMI and SCADA software using nothing more than the device's slave address and the published register list. An operator panel polls discrete inputs to animate field status, writes coils to issue commands, and reads input registers to trend analog and temperature values. No custom driver is required; the integrator simply configures tags against the documented registers.

This interoperability is what makes the MPINO platform deployable in real installations rather than isolated experiments. A line might combine an MPINO-16A8R as a master gathering data from several slaves with additional MPINO-8A8R-S nodes reporting to a central SCADA server. Each device answers the same well-defined protocol, so commissioning is a matter of assigning addresses and importing register definitions rather than writing bespoke communication code for every node.

Robust Transactions: CRC, Timeouts and Addressing

Industrial communication must fail safe, and Modbus RTU provides the mechanisms. Every frame carries a CRC-16 so a corrupted message is rejected rather than acted upon, and the ILIB implementation discards frames that do not validate. Each slave on the bus has a unique address from 1 to 247, and a master must honour response timeouts so that a silent or absent device does not stall the whole poll cycle.

Well-written master logic on an MPINO-16A8R treats a missing response as a defined fault condition, retrying a bounded number of times and then flagging the offline node rather than blocking. On the slave side, an MPINO-8A8T-S continues to service its local control loop while answering Modbus requests, so loss of the supervisory link never disables the machine's own safety and sequencing logic. This separation of local control from supervisory communication is essential to dependable field deployment.

Related controllers

MPINO-8A8R-S industrial Arduino controller — front view

MPINO-8A8R-S

MPINO-8A8R-S Industrial Arduino Controller

8 DI / 8 Relay / 4 AI / 2 NTC / RS-485 / I²C
$86.00
MPINO-8A8R industrial Arduino controller — front view

MPINO-8A8R

MPINO-8A8R Industrial Arduino Controller

8 DI / 8 Relay / 4 AI / RS-232 / RS-485 / UART / I²C
$92.00
MPINO-16A8R8T industrial Arduino controller — front view

MPINO-16A8R8T

MPINO-16A8R8T Industrial Arduino Controller

16 DI / 8 Relay / 8 Transistor / 4 AI / 2 AO / 2 NTC / RS-232 / RS-485 / UART / I²C
$115.00

Related guides

FAQ

Which MPINO models can run Modbus RTU?

Any MPINO with an RS-485 port can run Modbus RTU on a multi-drop bus: the MPINO-8A8R-S, MPINO-8A8R, MPINO-8A8T-S, MPINO-16A8R, MPINO-16A8R8T and MPINO-16A16R. Modbus RTU is implemented through the ILIB library and works for both master and slave roles.

How is MPINO I/O represented in the Modbus register map?

Relay and transistor outputs are exposed as coils, opto-isolated digital inputs as discrete inputs, and analog inputs, NTC channels and the analog outputs of the MPINO-16A8R8T as input or holding registers. Documenting this register map gives HMI and SCADA systems a clear contract to address the device.

Do I need a custom driver to connect MPINO to my SCADA system?

No. Because MPINO presents a standard Modbus RTU interface via ILIB, any HMI or SCADA package that supports Modbus RTU can communicate using only the slave address and the published register list. Integration is a configuration task, not a programming task.