zpl.tools
RFID

^RF - Read or Write RFID Format

Reads a tag, encodes a tag, or declares the access password used by later lock commands.

^RF moves data into a transponder and out of it. It encodes a tag, reads a tag back into a field, or declares the passwords that later lock commands need. Every other command in this category configures ^RF. The payload travels in the ^FD of the field, which the parameter table cannot show. The field belongs to the tag, and the renderer draws nothing for it.

Syntax

^RFo,f,b,n,m

Support

Recognised, deliberately skippedparsed: none · state: none · rendered: none

Accepted and skipped, because it configures the printer rather than the label. It cannot change the rendered output, and Labelary skips it too.

Encodes or reads the transponder embedded in a smart label, which is not part of the printed image. The parser consumes the tag payload ^FD and draws nothing for it. Neither the tag data nor an access or kill password reaches the label. The renderer does not parse this command. It reports IGNORED_COMMAND at info severity, which does not reach X-Warnings. Labelary is also silent, so the rendered label is identical in both engines. A read (^RFR) with ^FN returns no data, so a field that must print the read value comes out empty rather than wrong. — not pinned by a test

Labelary renders this command.

Parameters

oOperationoptional · one of a set

What to do with the tag.

Default
W
Invalid value
not documented, and we have not measured it. The renderer does not parse this command or validate its arguments. The guide does not state what a printer does with an out-of-range value.
Test coverage
No documented value is exercised by a test (W, R, S).
W
Write to (encode) the tag. (default)
R
Read the tag.
S
Specify the access password, which then follows in ^FD.
fFormatoptional · one of a set

How the printer interprets the ^FD payload.

Default
H
Invalid value
not documented, and we have not measured it. The renderer does not parse this command or validate its arguments. The guide does not state what a printer does with an out-of-range value.
Test coverage
No documented value is exercised by a test (A, H, E).
A
ASCII.
H
Hexadecimal. (default)
E
EPC. ^RB must set the field layout first.
bPassword or starting blockoptional · text

For a write or a read, the 16-bit starting block number, 0 up to the number of blocks in the selected memory bank. P instead means the access password, the kill password, or both, follow in ^FD as eight hexadecimal characters each. For the S operation this must be P.

Default
0
Invalid value
not documented, and we have not measured it. The renderer does not parse this command or validate its arguments. The guide does not state what a printer does with an out-of-range value.
Test coverage
nByte countoptional · integer

How many bytes to read or write. Not required when the memory bank is E or A, which take their length from the tag's PC bits or from the ^FD payload.

Default
1
Accepted range
1 to the tag's byte capacity bytes
Invalid value
not documented, and we have not measured it. The renderer does not parse this command or validate its arguments. The guide does not state what a printer does with an out-of-range value.
Test coverage
No test at the minimum, maximum or one step outside the range.
mGen 2 memory bankoptional · one of a set

Which Gen 2 memory bank the operation addresses.

Default
E
Invalid value
not documented, and we have not measured it. The renderer does not parse this command or validate its arguments. The guide does not state what a printer does with an out-of-range value.
Test coverage
No documented value is exercised by a test (E, A, 0, 1, 2, 3).
E
EPC, 96 bits at bit address 20h. (default)
A
EPC with the PC bits auto-adjusted to the length written.
0
Reserved, which holds the kill and access passwords.
1
EPC.
2
TID, the factory tag identifier.
3
User.

Behavior

The command has field scope. It belongs to the ^FD^FS pair around it, and one format can carry more than one ^RF. On a printer, a write occurs at the programming position, which ^RS or an earlier ^HR calibration sets. A field that prints tag data must be above that position, because below it the paper passes the print head before the data arrives.

A read with ^RFR and an ^FN returns no data here, so a field that prints tag contents prints nothing. The field is empty and not wrong.

Two properties of the parameter table matter. The 2006 edition of the guide gives four parameters and the operations W, L, R and P, where L is a write with lock and P reads a password. The guide documents the five parameters above for later firmware, including the Gen 2 memory bank and the S operation. The byte count n is unnecessary for the memory banks E and A, where the length comes from the tag's protocol-control bits or from the ^FD payload.

The payload is not printed

The renderer consumes the field data and draws nothing for it. ^RFW,H^FD1234ABCD^FS leaves a blank region, and ^RFS,H,P^FD…^FS keeps the access password and the kill password out of the image. The renderer reports IGNORED_COMMAND at info severity, which keeps the ignored field on the record and does not reach X-Warnings. This behavior matches Labelary, which reports nothing for either condition.

Until 2026-07-30 the behavior was the opposite. The renderer dropped the command, kept its field, and drew a field with no bar code element as a text run in the default font A. Each format that encoded a tag printed the payload at approximately 3 pt, small enough to pass a visual review.

Tested behavior

Differences from the specification

Example

An ordinary caption, then an encode. Only the caption should print:

^XA
^FO50,50^A0N,40,40^FDCarton 1^FS
^RFW,H^FD1234ABCD^FS
^XZ

Open in viewer