^RB - Define EPC Data Structure
Declares how many bits each field of an EPC code occupies, for a later EPC-format read or write.
An EPC code is not one number. It is a sequence of bit fields: a header, a filter
value, a company prefix, an item reference and a serial number. Their widths
depend on the EPC scheme. ^RB declares those widths, and a later ^RF with
format E then accepts one value for each field instead of one opaque payload.
The setting is persistent until another ^RB replaces it.
Syntax
^RBn,p0,p1,p2,...,p15Support
Accepted and skipped, because it configures the printer rather than the label. It cannot change the rendered output, and Labelary skips it too.
Describes the bit layout the printer must use when ^RF reads or writes EPC data. It carries no data of its own and draws nothing. 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 and with or without the command. — not pinned by a test
Labelary renders this command.
Parameters
nTotal bit sizeoptional · integerHow many bits the partitions cover in total. The upper bound is the bit size of the tag in use.
- Default
- 96
- Accepted range
- 1 to the tag's bit size bits
- 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.
p0 … p15Partition sizesoptional · integerThe size of each partition, in bits. The sizes must add up to the total bit size. The command accepts up to sixteen.
- Default
- 1
- Accepted range
- 1 to 64 bits
- 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.
Behavior
The partition sizes must add up to the total bit size n. One partition must not
be more than 64 bits, and the command accepts sixteen at most.
The guide separates the field values in ^FD in two ways: one example uses full
stops, ^FD1000.67108000.1122921504606846976, and another uses commas,
^FD0,3,12345,544332,22335221. A read back with ^RFR,E prints full stops
between the values. The renderer draws nothing for ^RB, which carries no data of
its own. The ^RF command that uses it does carry a payload, and the renderer
consumes that field and draws nothing.
Tested behavior
Example
The SGTIN-64 layout from the guide: a 2-bit header, a 3-bit filter, a 14-bit company prefix, a 20-bit item reference and a 25-bit serial number.
^XA
^FO50,50^A0N,40,40^FDSGTIN-64^FS
^RB64,2,3,14,20,25
^RFW,E^FD0,3,12345,544332,22335221^FS
^XZ
Related commands
^RFRead or Write RFID FormatReads a tag, encodes a tag, or declares the access password used by later lock commands.^RURead Unique RFID Chip SerializationBuilds a 38-bit serial number from the tag's factory identifier for use in EPC data and in printed fields.^RQWrite RFID EPC Data and PasswordsWrites EPC data together with the access and kill passwords in a single operation.