Cheat Sheets · Free PDF
Modbus and HART Cheat Sheet
Modbus RTU and TCP, RS485 and HART on one page: function codes, register numbering, frame layout, timing, wiring rules and HART basics.
One page A4Print ready PDFFree, no sign up
Download
A one page A4 sheet to print, pin up in the workshop or keep on your phone. Everything on it is also shown below.
Download PDF A4 · 81 KBFunction codes
| Code | Action |
|---|---|
| 01 | Read coils |
| 02 | Read discrete inputs |
| 03 | Read holding registers |
| 04 | Read input registers |
| 05 | Write single coil |
| 06 | Write single register |
| 15 | Write multiple coils |
| 16 | Write multiple registers |
Register numbering
| Type | Doc. number | Access |
|---|---|---|
| Coils | 0xxxx | Read/write bit |
| Discrete inputs | 1xxxx | Read bit |
| Input registers | 3xxxx | Read 16 bit |
| Holding registers | 4xxxx | Read/write 16 bit |
Protocol addresses are 0 based: 40001 is holding register address 0.
RTU frame
| Frame | Address | Function | Data | CRC (low byte first) |
| Slave address | 1 to 247 (0 = broadcast) |
| Character | 11 bits (start, 8 data, parity or 2nd stop, stop) |
| Frame gap | ≥ 3.5 character times |
| CRC | CRC 16, polynomial 0xA001 (reflected) |
Advertisement
Modbus TCP
| Port | 502 |
| Header (MBAP) | 7 bytes: transaction, protocol, length, unit ID |
| Error check | By TCP (no CRC) |
Floats and longs
- 32 bit values use two registers.
- IEEE 754 float; word order varies by device (big or little endian, swapped).
- If values look huge or tiny, try swapping words.
RS485 rules
- Daisy chain, no stars; short stubs.
- 120 Ω termination at both ends only.
- Bias resistors at one point.
- 32 unit loads per segment; up to about 1200 m at low baud.
- Twisted pair plus common reference; screen earthed at one point.
HART essentials
| Signal | FSK 1200 Hz = 1, 2200 Hz = 0, 1200 bit/s |
| Loop resistance | ≥ 250 Ω (typically 230 to 1100 Ω) |
| Connect | Across the transmitter or the loop resistor |
Common HART commands
| No | Command |
|---|---|
| 0 | Read unique identifier |
| 1 | Read primary variable |
| 2 | Read loop current and % range |
| 3 | Read dynamic variables and current |
| 6 | Write polling address |
| 12 | Read message |
| 13 | Read tag, descriptor, date |
| 15 | Read device information |
| 17 | Write message |
| 18 | Write tag, descriptor, date |
Troubleshooting
- No response: address, baud, parity, A/B swapped, termination.
- CRC errors: noise, grounding, wrong baud or stubs.
- Wrong values: register offset of one, word order, scaling.
Related Calculators and Tools
Advertisement
Frequently Asked Questions
Why is 40001 address 0?
Documentation numbers are 1 based with a type prefix; the protocol sends a 0 based address.
How long is a 3.5 character gap at 9600 baud?
About 4 ms (11 bits per character); above 19,200 baud a fixed 1.75 ms is used.
Why can my HART communicator not connect?
Usually loop resistance below 250 Ω or wrong connection points.
You May Also Like
Learn more on the blog
Modbus RTU troubleshooting: CRC, no response and fault table
A practical guide on instrumentationblog.in that explains the theory behind this cheat sheet.
Read Full ArticleMore Cheat Sheets
4 to 20 mA Cheat SheetPrintable A4 PDFFlow Measurement Formulas Cheat SheetPrintable A4 PDFPressure Cheat SheetPrintable A4 PDFTemperature Measurement Cheat SheetPrintable A4 PDFLevel Measurement Formulas Cheat SheetPrintable A4 PDFControl Valve Cheat SheetPrintable A4 PDFElectrical Formulas Cheat SheetPrintable A4 PDFOp Amp Formulas Cheat SheetPrintable A4 PDFElectronic Component Codes Cheat SheetPrintable A4 PDFPID Tuning Cheat SheetPrintable A4 PDFISA Instrument Letter Codes Cheat SheetPrintable A4 PDFIP, NEMA and Ex Rating Cheat SheetPrintable A4 PDFSIL and Functional Safety Cheat SheetPrintable A4 PDFCalibration and Uncertainty Cheat SheetPrintable A4 PDFAnalytical Instruments Cheat SheetPrintable A4 PDFPt100 and Thermocouple Tables Cheat SheetPrintable A4 PDFPLC I/O and Signals Cheat SheetPrintable A4 PDFEngineering Units Conversion Cheat SheetPrintable A4 PDFInstrument Loop Troubleshooting Cheat SheetPrintable A4 PDF