Modbus RTU FC03 Read Holding Registers Frame & CRC-16 Calculator

Build a Modbus RTU Function 0x03 Read Holding Registers hex request with exact CRC-16/MODBUS (0xA001) Lo/Hi checksum, byte map and C99/Python code.

Jump to results

Inputs

Frame mode & addressing
1–247 unicast, 0 broadcast.
Zero-based protocol PDU address (0–65535).
Count for reads, 0 or 1 for FC05, or a 16-bit value for FC06.
Raw validation & RS-485 bus

Results

Estimates
Modbus RTU Frame (Hex)01 03 00 00 00 0A C5 CD
Computed CRC-16
0xCDC5
Wire CRC order (Lo Hi)
C5 CD
Slave ID & Function
ID 1 · Read Holding Registers (0x03)
Frame length / air time
8 bytes · 9.17 ms
Inter-char timeout (t1.5)
1,719 µs
Frame silent gap (t3.5)
4,010 µs
RTU frame byte map · 8 bytes
B0 01 B1 03 B2 00 B3 00 B4 00 B5 0A B6 C5 B7 CD CRC-16/MODBUS: 0xCDC5 · Wire order: C5 CD (Lo → Hi)
  • Slave ID
  • Function Code
  • Address / Payload
  • CRC-16 Lo / Hi
Frame field breakdown
FieldBytes (Hex)Byte count
Slave ID011
Func 0x03031
Address00 002
Quantity00 0A2
CRC LoC51
CRC HiCD1
Copyable C99 & Python 3 CRC-16/MODBUS functions
#include <stddef.h>
#include <stdint.h>

/* CRC-16/MODBUS: init 0xFFFF, reflected polynomial 0xA001, wire order Lo then Hi */
uint16_t modbus_crc16(const uint8_t *buf, size_t len) {
  uint16_t crc = 0xFFFFU;
  for (size_t i = 0; i < len; ++i) {
    crc ^= (uint16_t)buf[i];
    for (int bit = 0; bit < 8; ++bit) {
      if (crc & 0x0001U) crc = (uint16_t)((crc >> 1) ^ 0xA001U);
      else crc >>= 1;
    }
  }
  return crc;
}

/* Test vector: 01 03 00 00 00 0A C5 CD (CRC=0xCDC5, wire: 0xC5 0xCD) */
static const uint8_t frame_pdu[6] = { 0x01, 0x03, 0x00, 0x00, 0x00, 0x0A };
def modbus_crc16(data: bytes) -> int:
    crc = 0xFFFF
    for b in data:
        crc ^= b
        for _ in range(8):
            crc = ((crc >> 1) ^ 0xA001) if (crc & 1) else (crc >> 1)
    return crc & 0xFFFF

pdu = bytes.fromhex("01 03 00 00 00 0A")
crc = modbus_crc16(pdu)
rtu_frame = pdu + crc.to_bytes(2, "little")
assert rtu_frame.hex(" ").upper() == "01 03 00 00 00 0A C5 CD"
print(rtu_frame.hex(" ").upper())

Modbus RTU transmits the CRC low byte first, followed by the high byte, whereas multi-byte register addresses and values are big-endian.

Construct exact Modbus RTU FC03 Read Holding Register requests

Function Code 0x03 (Read Holding Registers) is the workhorse command for polling VFDs, smart power meters, solar inverters and industrial PLCs over RS-485. Each request is exactly 8 bytes: 1-byte Slave ID, 1-byte Function 0x03, 2-byte big-endian start register, 2-byte big-endian register count, and 2-byte little-endian CRC-16.

Verify your wire bytes before sending them from a USB-RS485 dongle or firmware state machine, and inspect the required t3.5 silent framing gap for your bus baud rate.

Formulas

  • FC03 PDU = [ID, 0x03, Addr_Hi, Addr_Lo, Qty_Hi, Qty_Lo]
  • CRC-16/MODBUS(01 03 00 00 00 0A) = 0xCDC5 → wire C5 CD
  • Air time at 9600 bps = 8 bytes × 11 bits ÷ 9600 = 9.17 ms

Worked example

Polling 10 holding registers from address 0 on Slave ID 1 produces the 8-byte RTU frame `01 03 00 00 00 0A C5 CD` with t3.5 = 4,010 µs at 9,600 bps.

Frequently asked questions

What is the maximum number of holding registers a single FC03 request can read?

Modbus RTU caps FC03 reads at 125 contiguous 16-bit registers (250 data bytes) so the response stays within the 256-byte RTU frame limit.

My device datasheet says Holding Register 40001—what address do I enter?

Enter 0. The leading 4 in 40001 denotes FC03 holding space and the 1-based offset maps to zero-based PDU address 0x0000.

Why does my PLC ignore a valid FC03 frame?

Check RS-485 A/B polarity, slave ID mismatch, parity setting (Modbus default is 8E1 or 8N2 for 11 bits/char), and ensure at least 3.5 character times of bus silence before transmitting.