Some exotic Modbus slaves implement non-standard function codes or vendor-specific behaviours (for example, Read Coils returning a uint16 instead of a single bit); the vendor documentation must always be checked before assuming compliance with the standard.
True
Common vendor deviations include Read Coils that return a uint16 (some vendors encode a 0/1 coil on 16 bits), custom function codes 65-72 (Schneider and others add proprietary FCs inside the user-defined range reserved by the spec), and packed data layouts where a single 16-bit register carries several values. The only reliable cure is RTFM before integration, plus Wireshark or mbpoll on the live device to verify that the actual on-wire behaviour matches the document.
If a slave's behaviour seems to violate the spec, trust the wire capture over the datasheet; on Modbus the silicon is almost always more honest than the PDF.
Modbus bank in preparation
The full Modbus bank isn't available yet. Drop your email to get notified at launch and grab an early-bird discount.
Join the waitlist →See the 9 other Modbus practice questions
Related questions
- Which Modbus variant is today the most widely used for new installations in a modern IT/OT environment?2. Variants · RTU vs. TCP vs. ASCII
- When a Modbus slave cannot execute a request (invalid address, out-of-range value, etc.) it replies with an "Exception Response": the original function code with bit 7 set to 1, followed by an Exception Code explaining the reason.4. Function codes · Exception Responses
- Function 0x05 "Write Single Coil" writes a single binary output on a Modbus slave. The ON value is encoded as 0xFF00 and OFF as 0x0000; any other value is invalid.4. Function codes · Write Single Coil (0x05)
- Function 0x08 "Diagnostic" (serial Modbus RTU/ASCII only) is used to test communications and to read internal error counters of a slave through a set of sub-functions (Return Query Data, Restart Communications, Return Bus Message Count, etc.).4. Function codes · Diagnostic (0x08)
- When a Modbus TCP-to-RTU gateway bridges an RTU segment with several slaves, the Modbus TCP client uses the Unit ID in the MBAP header to target the specific RTU slave behind the gateway.5. Modbus TCP · Unit ID Gateway