Skip to main content

Modbus Frame Builder

v1.0.0

Modbus RTU / TCP frame builder — function codes, address, quantity, CRC / MBAP.

Modbus Frame
# Modbus RTU Request Frame

## Parameters
- Device address: 1 (0x1)
- Function code: 0x03 (Read Holding Registers)
- Start address: 0x0000 (0)
- Quantity: 10

## Frame (hex bytes)
01 03 00 00 00 0A [CRC16 low] [CRC16 high]

## Python example (pymodbus)
```python
from pymodbus.client import ModbusTcpClient
client = ModbusTcpClient("192.168.1.100", port=502)
result = client.read_holding_registers(address=0, count=10, slave=1)
print(result.registers)
client.close()
```