^HV — Host Verification
Plain English
Returns the **runtime value of a numbered field** (`^FN<f>`) back to the host **after the label has been processed** — for read-back-after-write verification. The host receives a single line over the same connection that issued the format: an optional header `h`, the field value (truncated to `n` bytes if specified), and an optional terminator `t`. Crucially, when paired with `^RT` (read RFID tag → into `^FN<f>`), the host receives the **value the RFID encoder actually read off the tag** — making `^HV` the canonical "did my encode succeed?" signal in production RFID flows. For a label without `^RT`, `^HV` simply echoes the input value sent in `^FN<f>^FD…^FS`.
When to use
For **RFID encode-then-verify**: write via `^RFW`, read back via `^RT` into a numbered field, return that field via `^HV` to the host — the host compares against what it sent and detects mis-encodes before shipping. Also for **printed-data audit** in regulated industries (pharmacy, IVD): record what was actually rendered on each label for trace/recall purposes. Use `e=Y` to receive a value even on error so the host can distinguish "no response" (printer dead) from "encode failed" (got an error code). The `h` header is useful when multiplexing several fields back to one host parser. Always send over a connection where the host is actively reading.
Syntax
^HVf,n,h,e,t
Parameters
| Parameter | Description |
|---|---|
f | Field number (matches `^FN<f>` placeholder); the value of that field is returned |
n | Maximum number of bytes to return (truncates long values); 1–256 typical |
h | Header text prepended to the response — useful for tagging multiple `^HV` returns to the same parser |
e | Return-on-error flag: `Y` send response even when the field encoding/read failed (lets host distinguish dead-printer vs failed-encode), `N` suppress on error |
t | Terminator text appended to the response (default CR/LF on most firmware) |
Example
^XA ^RS8 ^RT1,0,12,3,E,0 ^HV1,24,EPC=,Y,; ^FO50,50^FN1^FS ^XZ
After Gen2 setup, read 12 bytes from EPC bank into `^FN1`, then `^HV1,24,EPC=,Y,;` returns up to 24 chars of that value to the host as `EPC=3034257BF7194E4000001A85;` — host parses on `EPC=` prefix and `;` terminator. The `^FN1^FS` at FO 50,50 also prints the value visibly on the label. `e=Y` ensures the host receives a response even if the read failed, so it can distinguish dead printer from bad encode.