Modbus RTU Slave user guide
In order to use Iono Arduino Uno as a Modbus RTU device, you first need to configure the
RS-485 communication parameters and Modbus address. A simple serial configuration
console is implemented in the sketch.
Console
The configuration console is accessed through the same serial port used for the Modbus
communication.
Set the serial port speed to 9600, 8 bits, no parity, no flow-control and connect to the
Arduino’s serial port using the Arduino USB port and your preferred serial terminal
program. You can also connect via the RS-485 terminal block on the Iono Arduino Uno
Module.
When the Arduino Uno is powered-up or reset, you can enter console mode by typing five
or more consecutive space characters within 15 seconds from reset. If any other character
is received, Arduino will enter the normal Modbus RTU mode.
Press 0 to show the current configuration, 1 to 3 to enter the serial port speed, serial port
parity, and the Modbus address.
Sfera Labs Iono Uno (2.0) - Modbus RTU slave configuration menu
0. Print current configuration
1. Speed (baud)
2. Parity
3. Modbus device address
4. Input/Output rules
5. Save configuration and restart
Type a menu number (0, 1, 2, 3, 4, 5): 0
Current configuration:
Speed (baud): 115200
Parity: Even
Modbus device address: 2
Input/Output rules: - - - - - -
Press 4 to define the Input/Output rules. With these rules you can configure each one of
the 6 digital inputs to control the corresponding output relay.
The rules string consists of six characters, where the leftmost character represents the rule
for DI1/DO1 and the rightmost character for DI6/DO6. The possible rules are:
•
F: follow - the relay is closed when input is high
•
I: invert - the relay is closed when input is low
•
H: flip on L>H transition - the relay is flipped at any input transition from low to high
•
L: flip on H>L transition - the relay is flipped at any input transition from high to low
•
T: flip on any transition - the relay is flipped at any input transition, both high to low and
low to high