Protonest Master reads values from Modbus RTU devices through its RS-485 interface. Before configuring the gateway, record the slave address, baud rate, parity, stop bits, function codes, data types, and register map from the device datasheet.
Example device
This example uses an XY-MD02 temperature and humidity transmitter.
| Datasheet item | Example value |
|---|---|
| Slave address | 1 |
| Communication | 9600 baud, 8 data bits, no parity, 1 stop bit |
| Temperature | Input register 0x0001, function 04, signed value divided by 10 |
| Humidity | Input register 0x0002, function 04, unsigned value divided by 10 |
1. Configure the RS-485 bus
Open the bus settings
Open Sensors > Modbus, then select RS-485 bus.
Match the serial settings
Set Speed (baud) to
9600, Parity to None, and Stop bits to1.Set the polling interval
Enter an interval such as
10seconds.Save the bus
Select Save bus settings.
2. Add the temperature register
Create a register
Select All Modbus sections > Registers > Add register and turn on Enable register.
Name the published value
Enter
temperaturein JSON keyword.Enter the address
Set Slave address to
1, Register address to1, and Function to 04 - Read input registers.Choose the data format
Select Signed 16-bit. Leave Command interval (ms) at
100unless the device requires another value.Scale the value
Expand Advanced and set Decimal places to
1, Scale factor to0.1, and Unit to°C.Review and create
Confirm the summary says
Reading 1 register as Signed 16-bit from slave 1, address 1., then select Create register.
3. Add the humidity register
Repeat the process with these values:
| Field | Value |
|---|---|
| JSON keyword | humidity |
| Slave address | 1 |
| Register address | 2 |
| Function | 04 - Read input registers |
| Data format | Unsigned 16-bit |
| Decimal places | 1 |
| Scale factor | 0.1 |
| Unit | %RH |
4. Verify the readings
Check the interface
Open Diagnostics > Hardware and confirm that Modbus interface shows OK.
Validate the decoded values
Confirm that the temperature and humidity readings are plausible.
Confirm MQTT delivery
Check that values publish under the configured Modbus MQTT subtopic, whose factory default is
modbus-values.
Modbus reference
Bus limits
| Setting | Accepted value |
|---|---|
| Speed | 1200, 2400, 4800, 9600, 19,200, 38,400, 57,600, or 115,200 baud |
| Parity | None, Even, or Odd |
| Stop bits | 1 or 2 |
| Polling interval | Whole number from 1-86,400 seconds |
| Register definitions | Up to 150 |
Register addressing and formats
| Field | Accepted value or behavior |
|---|---|
| JSON keyword | 1-15 letters, digits, or underscores; first character must be a letter or underscore |
| Slave address | 1-247 |
| Register address | 0-65,535 |
| Function | 01 Read coils, 02 Read discrete inputs, 03 Read holding registers, or 04 Read input registers |
| Data format | Unsigned 16-bit, Signed 16-bit, Unsigned 32-bit, Float 32-bit, or Boolean |
| Data length | Set automatically: two registers for 32-bit formats, otherwise one |
| Command interval | Whole number from 10-60,000 ms |
| Decimal places | 0-3 |
| Unit | At most 3 UTF-8 bytes |
Functions 01 and 02 require the Boolean format. Use Scale factor to convert raw numeric values. Report zero while offline substitutes zero when the field device is unavailable; enable it only if downstream systems can distinguish that fallback from a real zero. Out-of-range alarm requires a minimum that does not exceed the maximum.
The register list can be searched by name, slave, address, or function. Select a register to edit it. Unsaved edits can be discarded; deleting a register requires confirmation and reindexes the remaining list.
If the Modbus interface stops working
- Confirm the field device has power.
- Check that A and B are not swapped.
- Confirm the slave address, baud rate, parity, and stop bits match the device.
- Confirm the function code, register address, and data type against the register map.
- Recheck the scale factor. For example,
305 × 0.1 = 30.5 °C.

