Modbus troubleshooting checklist
Modbus problems are usually caused by a small number of issues. The fastest way to solve them is to check the basics in the right order.
Use this checklist when a device does not reply, values look wrong, or communication works only sometimes.
Quick checklist
- Check that the device has power
- Check that the correct RS-485 lines are connected
- Check the slave ID
- Check baud rate, parity, and stop bits. All settings might not be supported, even if they show on the interface.
- Check that the master is reading the correct register type
- Check that the register address is correct
- Check that the function code is correct
- Check that the returned data is interpreted correctly
- Check scaling, signed values, and byte order
- Check wiring quality, grounding, and termination
Step 1: Check the physical basics
First make sure the device is powered and running normally. Then check the cable connections. If this is Modbus RTU over RS-485, make sure A and B are not swapped. Also check whether a common reference is needed between devices.
Loose terminals, broken wires, and wrong port selection are common problems. A lot of Modbus issues are simple wiring issues.
Step 2: Check serial settings
The master and slave must use the same serial settings. Check:
- baud rate
- parity
- stop bits
- data bits
If even one of these is wrong, the device may not reply at all, or the reply may contain errors.
Step 3: Check device settings
Make sure you are using the correct slave ID. If two devices on the same bus use the same ID, communication may fail or behave strangely.
Also check that the device really supports the register and function code you are using.
Step 4: Check the request
Look at the actual request frame.
Ask these questions:
- Is the slave ID correct?
- Is the function code correct?
- Is the register address correct?
- Is the register count correct?
- Is the CRC correct?
If the request is wrong, the device may return an exception or not reply.
Step 5: Check the returned data
If communication works but the values look wrong, the problem is often in data interpretation.
Check:
- Is the value signed or unsigned?
- Is scaling needed?
- Is the value stored in one register or more than one?
- Is byte order correct?
- Is word order correct?
A register may be read correctly, but the final value may still look wrong if it is interpreted in the wrong way.
Step 6: Check the documentation
Bad or unclear documentation causes many Modbus problems. Make sure the manual clearly states:
- register type
- address base
- units
- scaling
- read/write access
- data type
- byte and word order
If these are missing, you may have to test different options.
Common symptoms and likely causes
No reply
- wrong wiring
- wrong serial settings
- wrong slave ID
- bad CRC
- unsupported request
Exception response
- wrong register
- wrong function code
- write not allowed
Wrong values
- wrong address
- wrong scaling
- signed or unsigned confusion
- byte or word order problem
Works sometimes
- noise on the line
- bad wiring
- missing termination
- duplicate slave IDs
- unstable grounding
Final note
When troubleshooting Modbus, do not guess. Check one thing at a time. Start with power and wiring, then settings, then the actual frame, and only after that look at data interpretation.
Consulting
Manufacturers can hire me for help with Modbus device documentation, testing, and troubleshooting.