Question

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.).

ModbusMock examFunction codesHard
Answer

True

Function 0x08 is the standardised diagnostic for serial Modbus. The main sub-functions are 0x00 Return Query Data (echoes the request -- loopback test), 0x01 Restart Communications Option, 0x0A Clear Counters and Diagnostic Register, 0x0B Return Bus Message Count (total frame counter), 0x0C Return Bus Communication Error Count, and 0x0D Return Bus Exception Error Count. It is very useful for auditing the quality of a serial bus in production. Note that it does NOT exist in Modbus TCP, where error handling is delegated to TCP itself.

Preparation tip

Capture sub-functions 0x0B and 0x0C every hour into a trend log on critical serial buses: a slow drift in the error count is the earliest sign of a degrading cable or a noisy environment.

Waitlist

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
Want more?

See the 9 other Modbus practice questions

Related questions

Question from our independent practice bank. Modbus is a registered trademark of Modbus Organization, not affiliated with CertifBus.

Last updated: 19 May 2026

Join the waitlist
Modbus waitlist