Minimum Modbus RTU Function Codes Required for Slave Devices
Try Our CAS Modbus Explorer (CAS-1000-20):
A modern desktop utility for discovering, polling, simulating, and troubleshooting Modbus TCP and Modbus RTU devices.
Model: CAS-1000-20 | Platforms: Windows + Linux | Application: v1.2.0
Question: What is the minimum subset of functions that a Modbus RTU slave device should implement?
When designing a Modbus RTU slave device, one of the most common questions is which function codes are strictly required. The answer depends largely on whether the device is intended for a closed system or for commercial, multi-vendor interoperability.
Custom or Single-Master Modbus RTU Devices
If you are developing a Modbus RTU slave that will only communicate with a specific, known Modbus master, you are not required to implement the full Modbus function set.
In this scenario, the slave only needs to support the exact function codes that the master will use. For example, if the master application only reads coil status, the slave could legally implement only:
- 0x01 – Read Coils
This approach is common in tightly controlled embedded systems, test environments, or proprietary integrations where both sides of the communication are under the same design authority.
Commercially Available Modbus RTU Slave Devices
If you are developing a Modbus RTU slave device intended for commercial use or integration with third-party systems, broader function support is strongly recommended.
The Modbus specification groups function implementations into four informal classes. These classes help define increasing levels of capability and interoperability.
Modbus Function Code Classes
Class I – Minimum Useful Implementation
Class I represents the smallest practical subset of functions that allows meaningful data exchange.
- 0x03 – Read Holding Registers
- 0x16 – Write Multiple Registers
Class II – Commonly Implemented Functions
These functions are widely supported and are typically expected by HMIs, PLCs, and SCADA systems.
- 0x01 – Read Coils
- 0x02 – Read Discrete Inputs
- 0x04 – Read Input Registers
- 0x05 – Write Single Coil
- 0x06 – Write Single Register
- 0x07 – Read Exception Status
Class III – Data Transfer and HMI Functions
Class III functions are typically required for advanced monitoring, diagnostics, and supervisory systems.
- 0x15 – Write Multiple Coils
- 0x20 – Read General Reference
- 0x21 – Write General Reference
- 0x22 – Mask Write Register
- 0x23 – Read/Write Multiple Registers
- 0x24 – Read FIFO Queue
Class IV – Device-Specific and Network Functions
These functions are vendor-specific or dependent on the target device and network architecture. They are not universally required.
- 0x08 – Diagnostics
- 0x10 – Poll
- 0x11 – Get Communication Event Counter
- 0x12 – Get Communication Event Log
- 0x17 – Report Slave ID
- 0x25 – Firmware Replacement
- 0x27 – Report Local Address
Practical Recommendation
For maximum compatibility, commercially available Modbus RTU slave devices should implement at least Class I and Class II function codes. Supporting Class III functions further improves interoperability with HMIs and SCADA platforms.
Class IV functions should be implemented only when required by the application or product specification.
FAQ – Modbus RTU Slave Function Support
What is the absolute minimum Modbus RTU slave must support?
In a controlled system, a slave can support as little as a single function code, provided the master never requests anything else.
Are all Modbus function codes mandatory?
No. Modbus is intentionally flexible, and function support is implementation-specific.
Which function codes are most commonly required?
Read Holding Registers (0x03), Read Coils (0x01), and Write Single Register (0x06) are among the most commonly used.