Modbus & Industrial Communication FAQ
Expert answers to common questions about Modbus RTU/TCP, RS-485 wiring, serial debugging tools, gateway configuration and industrial communication troubleshooting.
Modbus Protocol
Modbus RTU and Modbus TCP use the same application-layer protocol but different transport layers:
- Modbus RTU uses serial communication (RS-232 or RS-485) with binary data encoding. It is commonly used for short-distance fieldbus communication in industrial environments. Maximum distance: 1200m at 9600 baud.
- Modbus TCP uses Ethernet with TCP/IP protocol on port 502. It enables long-distance communication over IP networks and integrates with modern SCADA, IoT and cloud platforms.
Both protocols support the same function codes (read/write coils, registers, etc.). A Modbus gateway converts between the two protocols.
The most commonly used Modbus function codes are:
- FC01 - Read Coils (0x addresses)
- FC02 - Read Discrete Inputs (1x addresses)
- FC03 - Read Holding Registers (4x addresses) - most commonly used
- FC04 - Read Input Registers (3x addresses)
- FC05 - Write Single Coil
- FC06 - Write Single Register
- FC15 - Write Multiple Coils
- FC16 - Write Multiple Registers
A Modbus gateway (also called protocol converter) translates between Modbus RTU serial and Modbus TCP Ethernet protocols. You need one when:
- Connecting legacy RS-485 serial devices to Ethernet/IP networks
- Enabling remote monitoring and SCADA integration
- Integrating with IoT platforms and cloud services
- Reducing wiring costs by using existing Ethernet infrastructure
ModulesLink offers Modbus gateways including ML-MOD-RTU, ML-MOD-WIFI and ML-MOD-PROTO.
Follow this systematic troubleshooting approach:
- 1. Physical layer: Check RS-485 wiring polarity (A to A, B to B), verify termination resistors (120 ohm at bus ends)
- 2. Serial settings: Confirm baud rate, parity and stop bits match between master and slave
- 3. Addressing: Verify slave address is correct and unique on the bus
- 4. Protocol: Use QModMaster bus monitor to observe raw traffic
- 5. Timeout: Increase timeout if slave responds slowly; decrease if network is fast
- 6. Network: For TCP, check IP configuration, firewall settings and port 502 access
Modbus RTU and ASCII are two serial transmission modes:
- Modbus RTU uses binary encoding with CRC checksum. More efficient - each byte carries 8 bits of data. This is the dominant mode used in modern industrial systems.
- Modbus ASCII uses hexadecimal ASCII characters with LRC checksum. Each byte is sent as two ASCII characters (e.g., 0x1A sent as '1' and 'A'). Less efficient but easier to debug visually.
RTU is strongly preferred for new installations due to its higher throughput. Most ModulesLink gateways support RTU mode.
The standard RS-485 specification supports up to 32 unit loads per bus segment. However:
- Many modern devices use 1/4 or 1/8 unit load, allowing 128 to 256 devices per segment
- Modbus RTU supports slave addresses 1-247, so the practical limit is often the RS-485 transceiver capability
- Use RS-485 repeaters to extend the bus and add more devices
- Keep in mind that more devices increase polling cycle time
Modbus uses four reference types for different data areas:
- 0x (Coils) - Read/write boolean values. FC01 read, FC05/FC15 write.
- 1x (Discrete Inputs) - Read-only boolean values. FC02 read.
- 3x (Input Registers) - Read-only 16-bit registers. FC04 read. Used for sensor measurements.
- 4x (Holding Registers) - Read/write 16-bit registers. FC03 read, FC06/FC16 write. Most commonly used for configuration and data exchange.
Note: The 0x/1x/3x/4x notation is a convention for documentation. The actual Modbus protocol uses zero-based addressing.
Testing Tools
It depends on your use case:
- QModMaster - Best for general Modbus RTU/TCP testing with GUI. Most popular choice.
- ModbusMechanic - Best for simulating both master and slave simultaneously. Cross-platform.
- modpoll - Best for command-line automation and scripting. Ultra lightweight.
- diagslave - Best for simulating a slave device to test master equipment.
Use QModMaster or modpoll as the Modbus master:
- Connect your RS-485 USB adapter to the computer
- Configure the serial port: COM port, baud rate (typically 9600 or 19200), parity (8E1 or 8N1)
- Set the slave address (1-247) matching your device
- Select function code (FC03 for holding registers is most common)
- Set register address and count
- Click Read to send the Modbus request and view the response
For different debugging needs:
- RealTerm - Advanced serial terminal with hex, binary and float display modes. Best for raw frame analysis.
- PuTTY - Simple serial terminal for basic text-based console access to devices.
- QModMaster - Protocol-level Modbus testing with structured register display.
Yes, all tools provided on ModulesLink Download Center are free:
- QModMaster - Open source (GPL-3.0)
- ModbusMechanic - Open source (GPL-3.0)
- modpoll - Free for use
- diagslave - Free for use
- RealTerm - Open source
- PuTTY - Open source (MIT)
All tools can be used for both personal and commercial purposes without licensing fees.
Wiring & Hardware
Proper RS-485 wiring is critical for reliable Modbus RTU communication:
- Use twisted pair cable (at least CAT5e quality) for noise immunity
- Connect A (Data+) to A and B (Data-) to B on all devices
- Add 120-ohm termination resistors at both ends of the bus
- For runs over 100m, use shielded cable and connect shield to ground at one end only
- Maximum 32 devices per segment (without repeaters)
- Use daisy-chain topology - avoid star or T-branch configurations
Maximum RS-485 distance depends on baud rate:
- 9600 baud: up to 1200m (4000 ft)
- 19200 baud: up to 600m (2000 ft)
- 115200 baud: up to 100m (330 ft)
Use repeaters for longer distances. Shielded cable and proper termination improve reliability in noisy industrial environments.
The most common serial configurations are:
- 9600 baud, 8 data bits, Even parity, 1 stop bit (8E1) - Most common for industrial devices
- 19200 baud, 8 data bits, No parity, 1 stop bit (8N1) - Common for modern devices
- 9600 baud, 8N1 - Used by some devices
Always check your device documentation for the correct settings. The master and slave must use identical serial parameters.
Downloads & Resources
Product documentation is available on each product's detail page:
- Go to Products and find your module series
- Click on the product to open its detail page
- Download datasheets (PDF), certificates (CE/CB/UL/RoHS), 3D models and PCB libraries
You can also use the Download Center with product filtering to find resources by series.
ModulesLink provides the following file formats:
- PDF - Datasheets, certificates, user manuals
- STEP - 3D CAD models for mechanical integration
- PcbLib / SchLib - Altium Designer PCB and schematic libraries
- ZIP - Software tools and packaged downloads
Still have questions?
Contact our technical support team for expert assistance with Modbus communication, product selection and integration.
Contact Support