Worked example
Choose a function, data object or exception to see its entry. The complete tables are below.
Read Holding Registers
0x03
- Data access
- Read holding registers · 16-bit words
- Protocol request limit
- 1–125 contiguous registers
- Transport scope
- Application protocol
- Exception-response function code
- 0x83
- Specification location and scope
- Section 6.3.
A protocol definition, not evidence that the selected device implements the function. Confirm its current register map and firmware documentation.
Underlined figures are rounded. Select one to copy its full value.
Reference tables
Public function codes
Defined public functions in V1.1b3. A listed function is not proof that a particular device implements it.
| Code | Function | Data access | Protocol request limit | Transport note | Source and scope |
|---|---|---|---|---|---|
| 0x01 | Read Coils | Read coils · bits | 1–2,000 contiguous coils | Application protocol | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 6.1. |
| 0x02 | Read Discrete Inputs | Read discrete inputs · bits | 1–2,000 contiguous inputs | Application protocol | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 6.2. |
| 0x03 | Read Holding Registers | Read holding registers · 16-bit words | 1–125 contiguous registers | Application protocol | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 6.3. |
| 0x04 | Read Input Registers | Read input registers · 16-bit words | 1–125 contiguous registers | Application protocol | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 6.4. |
| 0x05 | Write Single Coil | Write one coil · bit | Exactly one coil | Application protocol | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 6.5. |
| 0x06 | Write Single Register | Write one holding register · 16-bit word | Exactly one register | Application protocol | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 6.6. |
| 0x07 | Read Exception Status | Read eight implementation-defined status outputs | No request data | Serial line only | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 6.7. |
| 0x08 | Diagnostics | Communication diagnostics by subfunction | Subfunction-specific | Serial line only | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 6.8; some subfunctions can alter communications state. |
| 0x0B | Get Comm Event Counter | Read communications status and event count | No request data | Serial line only | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 6.9. |
| 0x0C | Get Comm Event Log | Read communications status, counters and event bytes | No request data | Serial line only | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 6.10. |
| 0x0F | Write Multiple Coils | Write contiguous coils · bits | 1–1,968 contiguous coils | Application protocol | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 6.11. |
| 0x10 | Write Multiple Registers | Write contiguous holding registers · 16-bit words | 1–123 contiguous registers | Application protocol | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 6.12. |
| 0x11 | Report Server ID | Read device-specific identity and run status | No request data | Serial line only | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 6.13; response content is device-specific. |
| 0x14 | Read File Record | Read one or more file-record groups | Request byte count 7–245 | Application protocol | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 6.14; reference type 0x06 is defined. |
| 0x15 | Write File Record | Write one or more file-record groups | Request byte count 9–251 | Application protocol | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 6.15; reference type 0x06 is defined. |
| 0x16 | Mask Write Register | Modify bits in one holding register | Exactly one register | Application protocol | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 6.16. |
| 0x17 | Read/Write Multiple Registers | Write holding registers, then read holding registers | Read 1–125; write 1–121 registers | Application protocol | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 6.17; write operation occurs before read. |
| 0x18 | Read FIFO Queue | Read FIFO count and value registers | Returned FIFO count no more than 31 | Application protocol | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 6.18. |
| 0x2B | Encapsulated Interface Transport | Dispatch an MEI-defined interface | Published MEI types 0x0D and 0x0E | Application protocol | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Sections 6.19–6.21; MEI 0x0E reads device identification. |
Primary data objects
The four primary Modbus data tables. Device memory mapping and whether tables overlay are implementation-specific.
| Object | Element | Protocol access | Core public functions | Source and scope |
|---|---|---|---|---|
| Coils | Single bit | Read–write | 0x01 read · 0x05/0x0F write | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Primary data model; functions shown are the core bit-access functions. |
| Discrete Inputs | Single bit | Read-only | 0x02 read | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Primary data model. |
| Input Registers | 16-bit word | Read-only | 0x04 read | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Primary data model. |
| Holding Registers | 16-bit word | Read–write | 0x03 read · 0x06/0x10/0x16/0x17 write | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Primary data model; functions shown are the core register-access functions. |
Exception codes
Exception codes returned in a Modbus exception response. A timeout or discarded CRC/parity error is not itself one of these exception responses.
| Code | Exception | Protocol meaning | Source and scope |
|---|---|---|---|
| 0x01 | Illegal Function | The requested function is not allowable for this server or its current state. | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 7. |
| 0x02 | Illegal Data Address | The starting address, requested span or their combination is not allowable for the server. | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 7. |
| 0x03 | Illegal Data Value | The request data structure contains a value the server cannot accept; it does not describe the application value stored in a register. | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 7. |
| 0x04 | Server Device Failure | An unrecoverable error occurred while the server attempted the requested action. | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 7. |
| 0x05 | Acknowledge | The server accepted a specialised programming request but needs more time to complete it. | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 7; specialised programming use. |
| 0x06 | Server Device Busy | The server is busy with a long-duration programming command; the client may retry later. | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 7; specialised programming use. |
| 0x08 | Memory Parity Error | A file-record consistency check failed while using function 0x14 or 0x15 with reference type 0x06. | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 7; specialised file-record use. |
| 0x0A | Gateway Path Unavailable | A gateway could not allocate an internal path from its input port to the requested output path. | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 7; gateway use. |
| 0x0B | Gateway Target Device Failed to Respond | A gateway did not obtain a response from the target device. | MODBUS Application Protocol SpecificationV1.1b3 · effective 2012-04-26Section 7; gateway use. |
Method and assumptions
Interpretation rule
Exception response function code = request function code + 0x80The exception function code signals that the response data byte is an exception code. A timeout or frame discarded for CRC/parity failure is not an exception response.
Limits of this result
- A public function code is not proof that a particular server implements it; confirm the current device register map and firmware documentation.
- Function code alone does not establish register meaning, scaling, signedness, byte/word order, address convention or whether a write is safe.
- Functions marked serial-line only are not general Modbus TCP services. Gateway behaviour can add further restrictions.
- Treat no response separately from an exception response. Cabling, timing, unit ID, CRC/parity, routing and device availability still require diagnosis.
Technical sources
Put the reference to work
Read the related engineering guidance, or carry this task into System Builder to identify the signal path and EpiSensor products.