20,919,685Total Points24,106Total Sites23,382Cell Towers69,500Racks Monitored56,753HVAC Units Monitored31,322UPS Units Monitored24,788Generators Monitored20,919,685Total Points24,106Total Sites23,382Cell Towers69,500Racks Monitored56,753HVAC Units Monitored31,322UPS Units Monitored24,788Generators Monitored20,919,685Total Points24,106Total Sites23,382Cell Towers69,500Racks Monitored56,753HVAC Units Monitored31,322UPS Units Monitored24,788Generators Monitored

Chapter 3: Data Sources & ProtocolsLesson 13 of 65

Configuring a Modbus TCP Data Source

How to set up a Modbus TCP data source in Mango by Radix IoT to read registers from PLCs, meters, and other Modbus-compatible devices.

  • 8 min read
  • Intermediate
  • Mango 4.x / 5.x

Overview

Modbus TCP is one of the most common protocols for communicating with industrial equipment. This guide shows how to configure a Modbus TCP data source in Mango by Radix IoT to read and write registers from your devices.

Prerequisites

  • A running Mango 4.x or 5.x instance with the Modbus module installed — without it, Modbus I/P does not appear in the data source list
  • A Modbus TCP device on the network (PLC, meter, sensor, etc.)
  • The device’s IP address and port (default Modbus port is 502)
  • A Modbus register map for your device (from the manufacturer)

Step 1: Create the Data Source

  1. Navigate to Data integration > Data sources
  2. Click the + button to add a new data source
  3. Select Modbus I/P from the dropdown
  4. Fill in the connection details:
Field Value Notes
Name Descriptive name e.g., “Building A Power Meter”
Host Device IP address e.g., 192.168.1.100
Port 502 Default Modbus port
Transport type TCP Also offers TCP with keep-alive and UDP
Update period 5 seconds Adjust based on your needs
Timeout (ms) 500 The default; increase it if the device is slow
Retries 2 Number of retry attempts
  1. Click Save

Step 2: Add Data Points

For each register you want to read:

  1. Open the data source’s Data points tab and click Add
  2. Configure the point:
Device id:          1                        (device address, usually 1)
Register range:     Holding register         (or Input register, Coil status, Input status)
Offset (0-based):   0                        (register address from device documentation)
Modbus data type:   2 byte unsigned integer  (depends on your register map)

Info

Register addressing can be confusing. Some manufacturers use 1-based addressing (register 40001) while Mango uses 0-based offsets. If the documentation says register 40001, enter offset 0 in Mango.

Step 3: Common Data Types

Modbus data type (as Mango labels it) When to Use
2 byte unsigned integer Positive integers 0-65535 (UINT16)
2 byte signed integer Integers -32768 to 32767 (INT16)
4 byte float Decimal values such as temperature or voltage (FLOAT32)
4 byte unsigned integer Large positive integers such as energy totals (UINT32)
Binary On/Off status values from a Coil status or Input status register

Mango also offers BCD, Mod10k, 1-byte, 8-byte and string types, plus a swapped variant of
most multi-register types — see Step 4.

Step 4: Match the Byte and Word Order

Different devices lay multi-register values out in different orders. In Mango the order is
part of the Modbus data type you choose — there is no separate byte-order setting:

  • 4 byte float - registers in the order the Modbus specification describes
  • 4 byte float swapped - the two registers exchanged (word swap)
  • 4 byte unsigned integer swapped bytes and words - both bytes and words exchanged

Every multi-register numeric type follows the same pattern, so a value read in the wrong order
is corrected by re-selecting the data type, not by changing a separate field.

Tip

If you’re reading a known value (like a firmware version) and it looks garbled, try the swapped variant of the same data type. This is one of the most common Modbus configuration issues.

Step 5: Enable and Verify

  1. Enable the data source (toggle the switch)
  2. Check the data points are showing values
  3. Verify values match what you expect from the device

Troubleshooting

“Illegal Data Address” error

  • Check your register offset is correct (0-based vs 1-based)
  • Verify the register range (Holding register vs Input register)
  • Confirm the Device id matches the device

Connection timeout

  • Verify the device IP is reachable (ping 192.168.1.100)
  • Check firewall allows port 502
  • Ensure no other Modbus master is already connected (some devices allow only one connection)

Values are wrong or garbled

  • Check the Modbus data type matches your register map
  • For multi-register values, try the swapped variant of the same data type
  • Verify if the value needs a Multiplier or Addend (see the Data Point Multiplier guide)

Get free access to all 65 Mango by Radix IoT training lessons

One short form unlocks every lesson and its video in this browser.

This form is hosted by Zoho. It loads only after you enable support cookies or choose to load it below.

We honored your browser’s Global Privacy Control signal — optional cookies are off and nothing is tracked.