RFID Programming Guide 3 V3

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 106

DownloadRFID Programming Guide 3 V3
Open PDF In BrowserView PDF
Zebra®
Radio Frequency Identification (RFID)

Programming Guide 3
for the ZT400™ Series and
ZD500R™ printers

P1062165-002 Rev. A

© 2014 ZIH Corp. The copyrights in this manual and the software and/or firmware in the printer described
therein are owned by ZIH Corp. and Zebra’s licensors. Unauthorized reproduction of this manual or the software
and/or firmware in the printer may result in imprisonment of up to one year and fines of up to $10,000
(17 U.S.C.506). Copyright violators may be subject to civil liability.
This product may contain ZPL®, ZPL II®, and ZebraLink™ programs; Element Energy Equalizer® Circuit; E3®; and
Monotype Imaging fonts. Software © ZIH Corp. All rights reserved worldwide.
Zebra, the Zebra head graphic, Link-OS, ZPL, and ZPL II are trademarks of ZIH Corp., registered in many
jurisdictions worldwide. All rights reserved.
Bluetooth® is a registered trademark of the Bluetooth SIG.
All other brand names, product names, or trademarks belong to their respective holders. For additional trademark
information, please see “Trademarks” on the product CD.

Proprietary Statement This manual contains proprietary information of Zebra Technologies Corporation and its
subsidiaries (“Zebra Technologies”). It is intended solely for the information and use of parties operating and
maintaining the equipment described herein. Such proprietary information may not be used, reproduced, or disclosed
to any other parties for any other purpose without the express, written permission of Zebra Technologies.

Product Improvements Continuous improvement of products is a policy of Zebra Technologies. All
specifications and designs are subject to change without notice.
Liability Disclaimer Zebra Technologies takes steps to ensure that its published Engineering specifications and
manuals are correct; however, errors do occur. Zebra Technologies reserves the right to correct any such errors and
disclaims liability resulting therefrom.
Limitation of Liability In no event shall Zebra Technologies or anyone else involved in the creation, production,
or delivery of the accompanying product (including hardware and software) be liable for any damages whatsoever
(including, without limitation, consequential damages including loss of business profits, business interruption, or loss
of business information) arising out of the use of, the results of use of, or inability to use such product, even if Zebra
Technologies has been advised of the possibility of such damages. Some jurisdictions do not allow the exclusion or
limitation of incidental or consequential damages, so the above limitation or exclusion may not apply to you.

FCC Radiation Exposure Statement (for printers with radios or RFID encoders) This equipment
complies with FCC radiation exposure limits set forth for an uncontrolled environment. This equipment should be
installed and operated with minimum distance 20cm between the radiator and your body.
This transmitter must not be co-located or operating in conjunction with any other antenna or transmitter.

Part Number: P1062165-002 Rev. A

Contents

About This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Who Should Use This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
How This Document Is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

1 • Introduction to RFID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
RFID Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Electronic Product Code (EPC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
EPC Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
EPC Structure in RFID Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
EPC Class 1, Generation 2 (Gen 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
Data and Tag Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
Gen 2 Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2 • Using RFID Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Performing Firmware Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RFID Label Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Considering RFID Transponder Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Accounting for Transponder Inlay Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Testing RFID Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Maximizing RFID Potential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Avoiding Radio Frequency Interference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Storing or Handling RFID Labels Correctly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the Correct RFID Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Setting the RFID Values Using Tag Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Setting the RFID Values Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Restoring the Printer’s Default Programming Position . . . . . . . . . . . . . . . . . . . . . . .
Locking RFID Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3/13/14

RFID Programming Guide 3

14
15
15
15
15
17
17
17
18
18
19
19
19

P1062165-002 Rev. A

4

Contents

3 • RFID Printer Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Adjust the Printer’s RFID Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
RFID User Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

4 • Creating Basic RFID Label Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Create and Send an RFID Label Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample RFID Label Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RFID Label Format 1—Encode a Gen 2 Tag in Hexadecimal . . . . . . . . . . . . . . . . . .
RFID Label Format 2—Encode a Gen 2 Tag in ASCII . . . . . . . . . . . . . . . . . . . . . . . .
RFID Label Format 3—Read Data from Tag and Print Data on Label . . . . . . . . . . . .
RFID Label Format 4—Encode Tag, Read Tag, and Print Data on Label . . . . . . . . .
RFID Label Format 5—Encode Tag, Read Tag, and Return Results to Host . . . . . .

32
33
33
34
35
36
37

5 • Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
RFID Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
RFID Error Codes and Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

6 • ZPL II Commands for RFID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
^HL or ~HL Return RFID Data Log to Host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
^HR Calibrate RFID Tag Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
^HV Host Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
^RB Define EPC Data Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
^RF Read or Write RFID Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
^RL Lock/Unlock RFID Tag Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
^RLM – Lock/Unlock the Specified Memory Bank . . . . . . . . . . . . . . . . . . . . . . . . . . .
^RLB – Permanently Lock Specified Memory Sections . . . . . . . . . . . . . . . . . . . . . . .
~RO Reset Advanced Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
^RR Enable Adaptive Antenna Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
^RS Set Up RFID Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
^RU Read Unique RFID Chip Serialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
^RW Set RF Power Levels for Read and Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

48
49
54
55
57
61
61
62
64
65
66
69
71

7 • SGD Commands for RFID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
odometer.rfid.valid_resettable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
odometer.rfid.void_resettable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.adaptive_antenna . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.antenna_sweep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.country_code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.error.response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.hop_table_version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.position.program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.reader_1.antenna_port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.reader_1.firmware_version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.reader_1.hardware_version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

P1062165-002 Rev. A

RFID Programming Guide 3

75
76
77
78
79
80
81
82
83
84
86
87

3/13/14

Contents

rfid.reader_1.model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
rfid.reader_1.power.read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
rfid.reader_1.power.write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
rfid.region_code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
rfid.tag.calibrate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
rfid.tag.read.content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
rfid.tag.read.execute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
rfid.tag.read.result_line1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
rfid.tag.read.result_line1_alternate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
rfid.tag.read.result_line2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
rfid.tag.read.result_line2_alternate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
rfid.tag.test.content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
rfid.tag.test.execute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
rfid.tag.test.result_line1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
rfid.tag.test.result_line2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

5

6

Contents

Notes •

____________________________________________________________________

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

About This Document

This section provides you with contact information, document structure and organization, and
additional reference documents.

Contents
Who Should Use This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
How This Document Is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

8

About This Document
Who Should Use This Document

Who Should Use This Document
The RFID Programming Guide 3 is intended for use by the label format developer or printer
integrator to create label formats that will encode RFID tags. The following printers are
supported by this guide:
• ZT400 Series with RFID option installed
• ZD500R
For other printers, refer to the original RFID Programming Guide, part number 58978L-XXX,
or to RFID Programming Guide 2, part number P1026148-XXX. You can download the most
recent version from http://www.zebra.com/manuals.

How This Document Is Organized
The RFID Programming Guide 3 is set up as follows:
Section

Description

About This Document on page 7

This section provides you with contact information, document
structure and organization, and additional reference documents.

Introduction to RFID on page 9

This section describes the basic concepts of Radio Frequency
Identification (RFID) and how RFID works with your printer.

Using RFID Features on page 13

This section guides you through some ideas to consider and some
tasks that you may need to perform before you begin using RFID
labels. When you have completed this section, you will be ready to
program your RFID label formats.

RFID User Menu on page 27

This section shows the parameters that appear on your printer in the
RFID User Menu.

Creating Basic RFID Label Formats
on page 31

Use the ZPL samples in this section as a base for programming your
own RFID label formats.

Troubleshooting on page 39

This section provides information about RFID operational errors that
you might need to troubleshoot. For other types of problems, consult
the User Guide for your printer.

ZPL II Commands for RFID
on page 47

This section contains the ZPL II commands for RFID-specific
applications.

SGD Commands for RFID on page 73

This section contains the Set/Get/Do (SGD) commands for RFIDspecific applications.

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

1
Introduction to RFID

This section describes the basic concepts of Radio Frequency Identification (RFID) and how
RFID works with your printer.

Contents
RFID Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Electronic Product Code (EPC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EPC Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EPC Structure in RFID Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EPC Class 1, Generation 2 (Gen 2). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data and Tag Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Gen 2 Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3/13/14

RFID Programming Guide 3

10
10
10
11
11
11
12

P1062165-002 Rev. A

10

Introduction to RFID
RFID Overview

RFID Overview
An RFID printer encodes (writes) information on ultra-thin HF or UHF RFID transponders
that are embedded in “smart” labels, tickets, and tags. The printer encodes the information;
verifies proper encoding; and prints bar codes, graphics, and/or text on the label’s surface.
The RFID transponder is sometimes called the RFID tag or an inlay. The transponder is
usually made of an antenna that is bonded to an integrated circuit (IC) chip. The IC chip
contains the RF circuit, coders, decoders, and memory. If you hold an RFID label up to the
light, you can see the transponder’s antenna, and you can feel a bump in the label where the IC
chip is located.
Encoding and printing of an RFID label usually are completed on the first try, but some
failures may occur. If you experience consistent failures, it may signal a problem with the
RFID tags, with your label formats, or with the transponder placement.

Electronic Product Code (EPC)
EPC is a product-numbering standard administered by GS1 that can be used to identify a
variety of items by using RFID technology. The 96-bit EPC code links to an online database,
providing a secure way of sharing product-specific information along the supply chain.
Note • The information in this section is provided for your convenience only and is subject to

change. Go to http://gs1.org/epcglobal for the latest EPC information.

EPC Fields
As with bar codes, EPC is divided into numbers that identify the manufacturer and product
type. However, EPC contains the following additional information:
• Header—identifies the length, type, structure, version, and generation of EPC
• Manager Number—identifies the company or company entity
• Object Class—similar to a stock keeping unit (SKU)
• Serial Number—the specific instance of the Object Class being tagged
Additional fields may be used as part of the EPC code to encode and decode information from
different numbering systems into human-readable form. For more information about EPC
specifications, refer to the EPC Global web site.

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

Introduction to RFID
EPC Class 1, Generation 2 (Gen 2)

EPC Structure in RFID Labels
In the printer, you can subdivide transponder data into unique fields. You can customize these
fields to create “smart” labels that meet your needs or that meet the standards necessary in
EPC programming.
The ^RB ZPL command (see ^RB on page 55 for) is used to define EPC structure. EPC field
data can be delimited with any of the following characters:

, ~ ! @ # $ % ^ & * | . < > / \ : ;

EPC Class 1, Generation 2 (Gen 2)
Gen 2 tags typically have a 96-bit EPC identifier and can support large data structures. The
size of user memory available (if any) varies by the model and manufacturer of the tag.

Data and Tag Security
Tag Passwords You can set optional 32-bit passwords that allow you to access tag data, to
lock tag data, or to permanently disable (kill) a tag. If desired, use the ZPL command ^RF
on page 57 to set the passwords and ^RL on page 61 to specify the type of lock.
Data Locking Options Tag memory can be safeguarded with flexible locking options
using ^RL on page 61. For example, you can lock a tag’s memory to prevent it from being
encoded accidentally and later unlock it for writing. A permanent locking feature prevents
rewriting of tag data.

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

11

12

Introduction to RFID
EPC Class 1, Generation 2 (Gen 2)

Gen 2 Memory Map
Figure 1 shows how information is stored on a Gen 2 tag.
Figure 1 • Gen 2 Memory Map

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

2
Using RFID Features

This section guides you through some ideas to consider and some tasks that you may need to
perform before you begin using RFID labels. When you have completed this section, you will
be ready to program your RFID label formats.

Contents
Performing Firmware Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RFID Label Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Considering RFID Transponder Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Accounting for Transponder Inlay Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Testing RFID Labels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Maximizing RFID Potential. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Avoiding Radio Frequency Interference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Storing or Handling RFID Labels Correctly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the Correct RFID Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Setting the RFID Values Using Tag Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Setting the RFID Values Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Restoring the Printer’s Default Programming Position. . . . . . . . . . . . . . . . . . . . . . . . .
Locking RFID Tags. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3/13/14

RFID Programming Guide 3

14
15
15
15
15
17
17
17
18
18
19
19
19

P1062165-002 Rev. A

14

Using RFID Features
Performing Firmware Updates

Performing Firmware Updates
Zebra may update printer firmware periodically to add new functionality or to fix any known
issues with older firmware. At any time, you may download the most recent firmware for your
RFID printer. For the firmware files and the downloading instructions, go to
http://www.zebra.com/firmware.
The RFID features described in this manual require the supported printers to have the
firmware version listed in Table 1. For other printers, refer to the original RFID Programming
Guide, part number 58978L-XXX, or to RFID Programming Guide 2, part number
P1026148-XXX. You can download the most recent version of any of these manuals from
http://www.zebra.com/manuals.
Important • Download only the firmware designed for your printer (Table 1). Downloading

inappropriate firmware may disable your printer or some or all of the RFID functionality.
Before downloading new firmware, print a printer configuration label and verify that the new
printer firmware version is appropriate for your printer.
Table 1 • RFID Printer Firmware Versions
Printer

Firmware Version

ZT400 Series

V75.19.7Z or later

ZD500R

V74.19.7Z or later

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

Using RFID Features
RFID Label Selection

RFID Label Selection
To select RFID labels for your printer, consider the RFID transponder (commonly called the
RFID tag) and where the transponder is placed in the label. Run tests to determine if the RFID
labels that you selected work as you expected before you purchase a large quantity of them.
This section provides a brief overview of things that you should take into account. Additional
RFID media considerations specific to your printer may be found at
http://www.zebra.com/transponders/.

Considering RFID Transponder Characteristics
Before you purchase Gen 2 RFID labels, determine which RFID transponder (tag) to use.
Many RFID transponders look similar, but they behave differently. For different transponders,
the following characteristics vary:
• the amount of programmable memory (which corresponds to the amount of data that can
be encoded in it)
• the way that data is segmented
• custom commands that can be used (such as block lock)
Select the transponder that best suits your needs.

Accounting for Transponder Inlay Position
Communication between the RFID label and the printer is established when the RFID label’s
transponder lines up with the printer’s RFID antenna or active antenna element. The optimal
tag programming position varies with the transponder size, its configuration, and the type of
chip used.
Important • Print quality may be affected by printing directly over the transponder.

In particular, there is an area on each label immediately around the location of the IC chip
where the printer may print with low quality. Design your printed label around the location of
the chip in the type of approved RFID label that you select.
Figure 2 on page 16 shows the physical specifications that should be taken into account for
each transponder when deciding where to place the transponder on a label.
Note • For the ZD500R, which is a center-justified printer, the RFID inlay should always be
centered horizontally in the label.

Testing RFID Labels
Before you purchase a large quantity of Gen 2 RFID labels, test a small batch to make sure that
they function as you need them to. You may need to adjust the transponder location or change
transponders if the RFID labels do not work in your application.

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

15

Using RFID Features
RFID Label Selection

Figure 2 • Transponder Placement Guidelines
feed direction

16

a

Inlay
Center

x

Inlay
Position

y

Inlay
Pitch

P1062165-002 Rev. A

Left inner edge to
transponder (inlay) center.
Viewed from face stock
side, feed direction down.

RF coupling with the transponder can change horizontally
across the width of the label. This dimension is relative to the
center of the transponder antenna, which is not always the
same as the chip location.
This measurement is typically defined with a ±3 mm tolerance.
Label Start to transponder The Inlay Position ensures proper RF encoding with the
antenna leading edge.
transponder in the current label. This dimension is relative to
the leading edge of the transponder antenna and is the optimal
distance from the print line to the antenna during encoding.
This measurement is typically defined with a ±3 mm tolerance.
Distance from the leading If transponders are spaced too closely together, coupling to
edge of one transponder
multiple transponders can sometimes occur. This dimension
antenna to the next.
defines the minimum pitch required to ensure coupling only
with the transponder in the current label. The minimum pitch
for printers supported by this manual is 16 mm (0.63 in.)

RFID Programming Guide 3

3/13/14

Using RFID Features
Maximizing RFID Potential

Maximizing RFID Potential
After an RFID label is encoded, how well it functions depends where the label is placed on an
item, the contents of the item (such as metals or liquids), the location of the RFID readers, and
how the label is stored.

Avoiding Radio Frequency Interference
Radio Frequency (RF) interference can be caused by many sources. This interference can
affect RFID performance by limiting the range of the RFID tags or preventing reading/writing
to the tags.
• Metal reflects radio frequency signals and is a leading source of RF interference. Foil or
metal-based media should only be used for RFID applications if the tags are designed to
work correctly with that type of media.
• Water and other liquids can absorb RF signals. Some media adhesives and label materials
can be unexpected sources of liquids that cause performance problems.
• Other RF equipment can cause interference if the equipment is positioned too close
together. Allow sufficient physical space between the RFID printer and other RF products
that share the same bandwidth (such as antennas, readers, wireless LANs, or other RFID
printer/encoders).

Storing or Handling RFID Labels Correctly
Store RFID labels at temperatures ranging from 60 to 203 °F (15.5 to 95 °C) in
environmentally stable conditions.
Limit RFID label exposure to electrostatic discharge (ESD). Low-humidity environments may
require the use of antistatic mats, straps, or clothing to help counter ESD.

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

17

18

Using RFID Features
Using the Correct RFID Settings

Using the Correct RFID Settings
You can perform two types of calibration on an RFID printer. Media calibration sets the
printer for the media criteria, such as label length and interlabel gap. RFID tag calibration sets
the printer for RFID criteria, such as the optimal programming position.
For best results, run tag calibration each time you change RFID media to allow the printer to
select the best programming position and other RFID settings for you. If tag calibration does
not produce the desired results, you can adjust the values manually.
Note • In the ZD500R printer with firmware V74.19.6Z, any time that a new label length is
measured, the programming position returns to the default value. This can happen in any of
the following situations:
• any calibration methods that measure length
• ^SS parameter for Label Pitch Length
• failed RFID tag calibration
With all other printers and firmware versions supported by this manual, the program position
is persistent.

Setting the RFID Values Using Tag Calibration
Before running tag calibration, calibrate your printer for the media being used, close the
printhead, and feed at least one label to make sure that tag calibration will begin from the
correct position. For more information on media calibration, refer to the User Guide for your
printer.
Perform tag calibration using one of the following ways:
• using the RFID CALIBRATE user menu option (see Perform RFID Tag Calibration
on page 27)
• using the ^HR ZPL command (see ^HR on page 49). This command also returns a results
table to the host computer.
• using the "run" option in the rfid.tag.calibrate SGD command (see
rfid.tag.calibrate on page 92).
During the tag calibration procedure, the printer feeds an RFID label 1 mm at a time while
taking readings (via READ TAG and WRITE TAG commands) to profile the location of the
RFID transponders in the media. This process ensures that only the current tag will be
encoded, not the tag before or after it. Based on the results, the printer selects optimal values
for the following items for the media being used:
• the programming position
• the read/write power levels
• the antenna element (ZT400 Series printers only)
These values are saved to nonvolatile memory (the value is saved even if the power is turned
off) and are used for all subsequent labels unless a label format specifies a different value.
If the tag cannot be read during the RFID tag calibration process, RFID calibration fails, and
the printer defaults are used. Try running the RFID tag calibration again with another RFID
label.
P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

Using RFID Features
Locking RFID Tags

Setting the RFID Values Manually
You can manually change the RFID settings in several ways. See Adjust the Printer’s RFID
Settings on page 22 for more information.

Restoring the Printer’s Default Programming Position
To restore the printer’s default programming position at any time, use the "restore" option
in the rfid.tag.calibrate SGD command (see rfid.tag.calibrate on page 92).

Locking RFID Tags
If an RFID tag supports locking, you can lock/unlock or permanently lock
(permalock)/permanently unlock memory banks or blocks/sectors of the tag’s memory.
To perform a lock/unlock command or a permalock command, the access password used for
the lock command must match the access password that is stored on the tag. The default access
password that is stored on tags is 00000000. This value must be changed to something other
than zero to perform lock/unlock functions; however, it can remain zero for permalock
functions.
If the access password on a tag needs to be changed, use the following command:

^RFW,H,P^FD^FS
If the correct password is already encoded on your tag, you do not need to write the password
to the tag as part of the label format, thereby adding to the programming time. Instead, you
may simply specify the password as part of the format using the following command, which
saves the time of writing it to the tag:

^RFS,H,P^FD^FS
For more information, see ^RF on page 57 and ^RL on page 61.

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

19

20

Using RFID Features
Locking RFID Tags

Notes •

____________________________________________________________________

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

3
RFID Printer Configuration

This section contains the ZPL II commands for RFID-specific applications.

Contents
Adjust the Printer’s RFID Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
RFID User Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

22

RFID Printer Configuration
Adjust the Printer’s RFID Settings

Adjust the Printer’s RFID Settings
This section presents the printer RFID settings that you can change and identifies the tools for
changing them. These tools include the following:
• ZPL and Set/Get/Do (SGD) commands
• The printer’s user menus
• The printer’s web pages when the printer has an active wired or wireless print server
connection (See the ZebraNet Wired and Wireless Print Servers User Guide for more
information about accessing the web pages. A copy is available at
http://www.zebra.com/manuals or on the user CD that came with your printer.)
Table 2 • RFID Settings
RFID Country
Code

RFID Status

RFID Tag
Calibration

P1062165-002 Rev. A

Select the RFID country code (if applicable).
Note • A prompt for the country code appears only on some printers the first
time that they are powered up, depending on the world region to which the
printers were shipped. Specify the appropriate country out to access the printer’s
RFID features.
Accepted values:

N/A

Related ZPL command(s):

N/A

SGD command used:

rfid.country_code on page 79

User menu item:

RFID COUNTRY CODE on page 27

Printer web page:

View and Modify Printer Settings > RFID Setup >
RFID COUNTRY CODE

Display the status of the RFID subsystem of the printer.
Accepted values:

N/A

Related ZPL command(s):

^HL or ~HL on page 48

SGD command used:

rfid.error.response on page 81

User menu item:

RFID STATUS on page 27

Printer web page:

N/A

Initiate tag calibration for RFID media. (Not the same as media and ribbon calibration.)
Accepted values:

N/A

Related ZPL command(s):

^HR on page 49

SGD command used:

rfid.tag.calibrate on page 92

User menu item:

RFID CALIBRATE on page 27

Printer web page:

N/A

RFID Programming Guide 3

3/13/14

RFID Printer Configuration
Adjust the Printer’s RFID Settings

Table 2 • RFID Settings (Continued)
Read RFID Data

Read and return the specified tag data from the RFID tag located over the RFID
antenna. No printer movement occurs while tag data is being read. The printhead can be
open or closed.

epc = reads the EPC data based on the EPC size
specified in the RFID tag’s protocol bits, up to
160 bits

Accepted values:

tid information = reads the first 32 bits of the
TID (Tag ID)
password status = reads the tag’s access and kill
passwords
protocol bits = reads the protocol bits from the
EPC memory banks and converts that value to
the EPC size
memory bank sizes = reads the EPC, TID, and
user memory banks sizes

RFID Test

Related ZPL command(s):

^RF on page 57

SGD command used:

rfid.tag.read.content on page 93 and
rfid.tag.read.execute on page 94

User menu item:

READ RFID DATA on page 27

Printer web page:

N/A

During the RFID test, the printer attempts to read and write to a transponder. No printer
movement occurs with this test.

quick = performs a read EPC test and a write EPC
test (using random data)

Accepted values:

read = performs a read EPC test
write = performs a write EPC test (using random
data)

3/13/14

Related ZPL command(s):

N/A

SGD command used:

rfid.tag.test.content on page 99 and
rfid.tag.test.execute on page 100

User menu item:

RFID TEST on page 28

Printer web page:

N/A

RFID Programming Guide 3

P1062165-002 Rev. A

23

24

RFID Printer Configuration
Adjust the Printer’s RFID Settings

Table 2 • RFID Settings (Continued)
Programming
Position

If the desired programming position (read/write position) is not achieved through RFID
tag calibration, a value may be specified. See Using the Correct RFID Settings
on page 18 for more information.

F0 to Fxxx (where xxx is the label length in
millimeters or 999, whichever is less)
The printer prints the first part of a label until it
reaches the specified distance and then begins
programming. After programming, the printer
prints the remainder of the label.

Accepted values:

B0 to B30
The printer backfeeds the label for the
specified distance and then begins
programming. To account for the backfeed,
allow empty media liner to extend out of the
front of the printer when using a backward
programming position.

RFID Antenna
Element

Related ZPL command(s):

^RS on page 66

SGD command used:

rfid.position.program on page 83

User menu item:

RFID PROGRAM POS. on page 28

Printer web page:

View and Modify Printer Settings > RFID Setup >
PROGRAM POSITION

If the desired antenna is not achieved through RFID tag calibration, a value may be
specified.
Note • This parameter does not apply to ZD500R printers, which always use an
antenna element value of A1.
A1, A2, A3, A4
B1, B2, B3, B4
C1, C2, C3, C4
D1, D2, D3, D4
E1, E2, E3, E4

Accepted values:

P1062165-002 Rev. A

Related ZPL command(s):

^RW on page 71

SGD command used:

rfid.reader_1.antenna_port on page 84

User menu item:

RFID ANTENNA on page 28

Printer web page:

View and Modify Printer Settings > RFID Setup >
RFID ANTENNA

RFID Programming Guide 3

3/13/14

RFID Printer Configuration
Adjust the Printer’s RFID Settings

Table 2 • RFID Settings (Continued)
RFID Adaptive
Antenna

Note •

• This feature does not apply to ZD500R printers, which always use an antenna

element value of A1.
• The label length must be 2 in. (51 mm) or greater.
If the printer cannot find RFID tags with the antenna element specified, the printer may
try neighboring antenna elements. If the printer is unsuccessful communicating with the
RFID tag after trying the neighboring antenna elements, the printer voids the label.
none = The printer uses only the current antenna
element selection.

Accepted values:

neighbors = The printer attempts to read the tag
using the antenna elements to the left/right and
above/below the current antenna. The antenna
element that is successful is used for all
subsequent RFID commands until the next
unsuccessful attempt, until the printhead is
opened, or until the printer is power cycled.

RFID Antenna
Sweep

Related ZPL command(s):

^RR on page 65

SGD command used:

rfid.adaptive_antenna on page 77

User menu item:

N/A

Printer web page:

View and Modify Printer Settings > RFID Setup >
ADAPTIVE ANTENNA

Note •

• This feature does not apply to ZD500R printers, which always use an antenna

element value of A1.
• The label length must be 2 in. (51 mm) or greater, and the programming

position must be F0.
If the RFID media loaded in the printer is known to be in range of an antenna at the F0
programming position, you can avoid RFID calibration by using the RFID antenna
sweep feature. With this feature enabled, when the first RFID format is sent after a
printer powerup or printhead close, the printer scans through the antennas to find the
optimal antenna element.

3/13/14

Accepted values:

on, off

Related ZPL command(s):

N/A

SGD command used:

rfid.antenna_sweep on page 78

User menu item:

N/A

Printer web page:

N/A

RFID Programming Guide 3

P1062165-002 Rev. A

25

26

RFID Printer Configuration
Adjust the Printer’s RFID Settings

Table 2 • RFID Settings (Continued)
RFID Read
Power

RFID Write
Power

RFID Valid
Counter

RFID Void
Counter

P1062165-002 Rev. A

If the desired read power is not achieved through RFID tag calibration, a value may be
specified.
Accepted values:

0 to 30

Related ZPL command(s):

^RW on page 71

SGD command used:

rfid.reader_1.power.read on page 89

User menu item:

RFID READ POWER on page 28

Printer web page:

View and Modify Printer Settings > RFID Setup >
RFID READ PWR

If the desired write power is not achieved through RFID tag calibration, a value may be
specified.
Accepted values:

0 to 30

Related ZPL command(s):

^RW on page 71

SGD command used:

rfid.reader_1.power.write on page 90

User menu item:

RFID WRITE POWER on page 29

Printer web page:

View and Modify Printer Settings > RFID Setup >
RFID WRITE PWR

Resets the RFID valid label counter to zero.
Accepted values:

N/A

Related ZPL command(s):

~RO on page 64

SGD command used:

odometer.rfid.valid_resettable on page 75

User menu item:

RFID VALID COUNT on page 29

Printer web page:

N/A

Resets the RFID void label counter to zero.
Accepted values:

N/A

Related ZPL command(s):

~RO on page 64

SGD command used:

odometer.rfid.void_resettable on page 76

User menu item:

RFID VOID COUNT on page 29

Printer web page:

N/A

RFID Programming Guide 3

3/13/14

RFID Printer Configuration
RFID User Menu

RFID User Menu
This section shows the parameters that appear on your printer in the RFID User Menu.
Items in this section are shown in the order in which they appear when you scroll through the
RFID menu on your printer’s control panel. For instructions on how to access the menus and
navigate through them, refer to the User Guide for your printer.

Select the RFID Country Code
Select the RFID country code (if applicable).

RFID COUNTRY CODE

▼

▲

NOT SELECTED

Note • A prompt for the country code appears only on some

printers the first time that they are powered up, depending
on the world region to which the printers were shipped.
Specify the appropriate country to access the printer’s
RFID features.

View the RFID Status
This parameter displays the status of the RFID subsystem of the
printer. During an error condition, an error message displays.

RFID STATUS
RFID OK

See RFID Status on page 22 for more information.

Perform RFID Tag Calibration
Initiate tag calibration for RFID media.

RFID CALIBRATE

See RFID Tag Calibration on page 22 for more information.

START

Read and Display the RFID Tag Data

▼

READ RFID DATA
EPC
12345ABC12345ABC124
5ABC

▲

READ

3/13/14

When this option is selected, the reader attempts to read the
specified information from an RFID tag, even if the printhead is
open. No printer movement occurs while tag data is being read.
If you wish to read and display the information stored in an RFID
tag:
1. Position the RFID label with its transponder over the RFID
antenna.
2. Use the UP ARROW or DOWN ARROW to select the type
of information that you want read and displayed.

RFID Programming Guide 3

P1062165-002 Rev. A

27

28

RFID Printer Configuration
RFID User Menu

3. Press RIGHT SELECT to select READ.

The results of the test are shown on the display.
See Read RFID Data on page 23 for more information.

Perform an RFID Test
During the RFID test, the printer attempts to read and write to a
transponder. No printer movement occurs with this test.

RFID TEST
READ OK
WRITE OK
START

If you wish to test an RFID label:
1. Position the RFID label with its transponder over the RFID
antenna array.
2. Press RIGHT SELECT to select START.
The results of the test are shown on the display.
See RFID Test on page 23 for more information.

Display or Change the RFID Programming Position
RFID PROGRAM POS.

▼

F0

▲

This menu item displays the current programming position. If the
desired programming position is not achieved through RFID tag
calibration, a value may be specified.
See Programming Position on page 24 for more information.

Display or Change the RFID Antenna Element*
RFID ANTENNA

▼

A1

▲

This menu item displays the RFID antenna element in use. If the
desired antenna element is not selected through RFID tag
calibration, a value may be specified.
See RFID Antenna Element on page 24 for more information.
* This menu item does not appear for printers that contain only
one RFID antenna element.

Display or Change the RFID Read Power
RFID READ POWER

▼

16

▲

This menu item displays the current read power setting. If the
desired read power is not achieved through RFID tag calibration, a
value may be specified.
See RFID Read Power on page 26 for more information.

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

RFID Printer Configuration
RFID User Menu

Display or Change the RFID Write Power
RFID WRITE POWER

▼

16

▲

This menu item displays the current write power setting. If the
desired write power is not achieved through RFID tag calibration,
a value may be specified.
See RFID Write Power on page 26 for more information.

Display or Reset the RFID Valid Counter
Displays the RFID valid label count or resets the counter to zero.

RFID VALID COUNT

See RFID Valid Counter on page 26 for more information.
0
RESET

Display or Reset the RFID Void Counter
Displays the RFID void label count or resets the counter to zero.

RFID VOID COUNT

See RFID Void Counter on page 26 for more information.
0
RESET

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

29

30

RFID Printer Configuration
RFID User Menu

Notes •

____________________________________________________________________

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

4
Creating Basic RFID
Label Formats

Use the ZPL samples in this section as a base for programming your own RFID label formats.
For specific information about individual ZPL commands, see ZPL II Commands for RFID
on page 47.

Contents
Create and Send an RFID Label Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample RFID Label Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RFID Label Format 1—Encode a Gen 2 Tag in Hexadecimal . . . . . . . . . . . . . . . . . . .
RFID Label Format 2—Encode a Gen 2 Tag in ASCII. . . . . . . . . . . . . . . . . . . . . . . . .
RFID Label Format 3—Read Data from Tag and Print Data on Label . . . . . . . . . . . . .
RFID Label Format 4—Encode Tag, Read Tag, and Print Data on Label . . . . . . . . . .
RFID Label Format 5—Encode Tag, Read Tag, and Return Results to Host . . . . . . .

3/13/14

RFID Programming Guide 3

32
33
33
34
35
36
37

P1062165-002 Rev. A

32

Creating Basic RFID Label Formats
Create and Send an RFID Label Format

Create and Send an RFID Label Format
The following pages contain sample RFID label formats that you can modify to create your
own RFID label formats.

To create an RFID label based on a sample label, complete these steps:
1. Using any word processor or text editor that is capable of creating ASCII-only files (for

example, use Microsoft® Word and save as a .txt file), type in the label format exactly as
shown in the desired sample.

2. Save the file to your computer.

When naming the file, use .zpl as the extension for the file (for example, you may
choose to name a file format1.zpl).
3. Set up the printer, and turn the power On (I).
4. Copy the file to the printer. One way to do this is by using the Zebra Setup Utilities (to

download go to http://www.zebra.com/us/en/products-services/software/managesoftware/zebra-setup-utility.html).
5. Compare your label results with those shown in the sample. If your results are not the

same as those shown, confirm that the file you created is identical to the format shown,
and then repeat the printing procedure.
6. Check the RFID data on your label.
a.

Open the printhead, and place the label above the antenna in the printer.

b.

Use one of the methods given in Read RFID Data on page 23 to view the transponder
data.

c.

Compare your RFID data with that shown in the sample. If your data does not look
like what is shown, confirm that the file you created is identical to the format shown,
and then resend the label format to the printer.

7. When you are certain that the file you created is correct, substitute your data in the label

format where necessary.

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

Creating Basic RFID Label Formats
Sample RFID Label Formats

Sample RFID Label Formats
Use the formats in this section to assist you in creating your own RFID label formats.

RFID Label Format 1—Encode a Gen 2 Tag in Hexadecimal
Line
Number

Type This ZPL Code

Function of ZPL Code

1

^XA

Indicates start of label format.

2

^FO50,50
^A0N,65
^FDSimple write example
^FS

Prints “Simple write example” on the label at
location 50,50.

3

^RFW,H
^FD112233445566778899001122
^FS

W,H = write hex
Encodes the 12 bytes of data (96 bits) to the
tag. The data written is:
112233445566778899001122

4

^XZ

Indicates end of label format.

Resulting Label

Simple write example

Programmed to Transponder
112233445566778899001122
Control Panel Display

▼

READ RFID DATA
EPC
11223344556677889900
1122

▲

READ

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

33

34

Creating Basic RFID Label Formats
Sample RFID Label Formats

RFID Label Format 2—Encode a Gen 2 Tag in ASCII
This label format is different in what shows on the control panel. The control panel always
displays RFID data in hexadecimal.
Line
Number

Type This ZPL Code

Function of ZPL Code

1

^XA

Indicates start of label format.

2

^FO50,50
^A0N,65
^FDSimple write example
^FS

Prints “Simple write example” on the label at location
50,50.

3

^RFW,A
^FD00 rfid data
^FS

W,A = write ASCII
Encodes 00 rfid data to the tag in hexadecimal
format, which is 12 bytes of data (96 bits). The data
written is:
303020726669642064617461

4

^XZ

Indicates end of label format.

Resulting Label

Simple write example

Programmed to Transponder
303020726669642064617461

Control Panel Display

▼

READ RFID DATA
EPC
30302072666964206461
7461

▲

READ

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

Creating Basic RFID Label Formats
Sample RFID Label Formats

RFID Label Format 3—Read Data from Tag and Print Data on Label
This example assumes that the tag created using RFID Label Format 1—Encode a Gen 2 Tag
in Hexadecimal on page 33 is being read.
Line
Number

Type This ZPL Code

Function of ZPL Code

1

^XA

Indicates start of label format.

2

^FO50,50
^A0N,40
^FN0
^FS

^FN0 is a placeholder field variable for the tag data
that will be read in the following line. When the label
prints, the data read from the tag will be printed at
location 50,50.

3

^FN0
^RFR,H
^FS

R,H = read hexadecimal
The read results are put into field variable 0 (^FN0).
At this point, the printer substitutes previous instances
of ^FN0 in the label format with the data from this
field. If necessary, the data read from the tag will be
padded with zeroes to the maximum bit size.

4

^XZ

Indicates end of label format.

Read from Transponder
112233445566778899001122
Resulting Label

112233445566778899001122

Control Panel Display

▼

READ RFID DATA
EPC
11223344556677889900
1122

▲

READ

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

35

36

Creating Basic RFID Label Formats
Sample RFID Label Formats

RFID Label Format 4—Encode Tag, Read Tag, and Print Data on
Label
Line
Number

Type This ZPL Code

Function of ZPL Code

1

^XA

Indicates start of label format.

2

^FO60,60
^A0N,40
^FN7
^FS

When the label prints, the data read from the tag at
field variable 7 (^FN7) will be printed at location
60,60.

3

^RFW,A
^FD0data
^FS

W,A = write ASCII
Encodes 0data into the block in hexadecimal format,
padded with 8 bytes of zeroes to make the data
12 bytes. The data written is:

306461746100000000000000
4

^FN7
^RFR,A
^FS

R,A = read ASCII
Reads the tag data into field variable 7 (^FN7). After
this occurs, any fields in this label format that have
^FN7 will be replaced with this read data. Because
ASCII format was specified, the hexadecimal value is
converted back to ASCII format before being printed
on the label.

5

^XZ

Indicates end of label format.

Programmed to Transponder
306461746100000000000000

Read from Transponder
306461746100000000000000

Resulting Label

0data

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

Creating Basic RFID Label Formats
Sample RFID Label Formats

Control Panel Display

▼

READ RFID DATA
EPC
30646174610000000000
0000

▲

READ

RFID Label Format 5—Encode Tag, Read Tag, and Return Results
to Host
Line
Number

Type This ZPL Code

Function of ZPL Code

1

^XA

Indicates start of label format.

2

^FO50,50
^A0N,65
^FN3
^FS

When the label prints, the data read from the tag at
field variable 3 (^FN3) will be printed at location
50,50.

3

^RFW,H
^FD0102030405
^FS

W,H = write hex
Encodes 12 bytes of data (96 bits) to the tag with
7 bytes of zeroes as padding. The data written is:

010203040500000000000000
4

^FN3
^RFR,H
^FS

R,H = read hexadecimal
Reads the tag data into field variable 3 (^FN3). After
this occurs, any fields in this label format that have
^FN3 will be replaced with this read data.

5

^HV3

Returns the value in ^FN3 to the host computer. Data
is sent over whichever communication channel is
established with the host (such as parallel, serial,
USB, Ethernet). In this example,
010203040500000000000000 would be returned
to the host.

6

^XZ

Indicates end of label format.

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

37

38

Creating Basic RFID Label Formats
Sample RFID Label Formats

Programmed to Transponder
010203040500000000000000
Read from Transponder
010203040500000000000000
Resulting Label

010203040500000000000000

Control Panel Display

▼

READ RFID DATA
EPC
01020304050000000000
0000

▲

READ

Sent to Host Computer
010203040500000000000000

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

5
Troubleshooting

This section provides information about RFID operational errors that you might need to
troubleshoot. For other types of problems, consult the User Guide for your printer.

Contents
RFID Problems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
RFID Error Codes and Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

40

Troubleshooting
RFID Problems

RFID Problems
Table 3 identifies problems that may occur with RFID printers, the possible causes, and the
recommended solutions.
Table 3 • RFID Problems
Problem

Possible Cause

Recommended Solution

The RFID-enabled
printer voids every
label.

The printer is not calibrated for
the media being used.

1. Perform media calibration. Refer to the User

You are using an incorrect
value for the programming
position or another RFID
setting.

1. Perform RFID tag calibration. (See RFID Tag

You are sending RFID ZPL or
SGD commands that are
incorrect.

1. Check your label formats. See ZPL II

The printer is unable to
communicate with the RFID
reader.

1. Turn off (O) the printer.

Guide for your printer for media calibration
instructions.
2. Perform RFID tag calibration. (See RFID Tag
Calibration on page 22.)
3. If necessary, adjust the RFID settings
manually. (See Adjust the Printer’s RFID
Settings on page 22.)
Calibration on page 22.)
2. If necessary, adjust the RFID settings
manually. (See Adjust the Printer’s RFID
Settings on page 22.)
Commands for RFID on page 47 or SGD
Commands for RFID on page 73.
2. For sample label formats, see Sample RFID
Label Formats on page 33.
2. Wait 10 seconds.
3. Turn on (I) the printer.
4. If the problem persists, you may have a bad

RFID reader or a loose connection between
the RFID reader and the printer. Contact
Technical Support or an authorized Zebra
RFID service technician for assistance.
The printer is unable to
communicate with the encoding
module. (ZT400 Series printers
only)

1. Turn off (O) the printer.
2. Wait 10 seconds.
3. Turn on (I) the printer.
4. If the problem persists, you may have a bad

encoding module or a loose connection
between the encoding module and the printer.
Contact Technical Support or an authorized
Zebra RFID service technician for assistance.

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

Troubleshooting
RFID Problems

Table 3 • RFID Problems (Continued)
Problem

Possible Cause

Recommended Solution

(Continued from
previous page)

The settings are incorrect in
your label designer software.

The software settings override the printer
settings. Make sure that the software and printer
settings match.

The RFID-enabled
printer voids every
label.

Radio frequency (RF)
interference from another RF
source.

Do one or more of the following as necessary:
• Move the printer away from fixed RFID
readers or other RF sources.
• Make sure that the media door is closed at all
times during RFID programming.

Low yields. Too many
RFID tags per roll
are voided.

Some RFID tags are more
sensitive than others and may
require special printer settings.

1. Run RFID tag calibration (see Setting the

Radio frequency (RF)
interference from another RF
source.

Do one or more of the following as necessary:
• Move the printer away from fixed RFID
readers.
• Make sure that the media door is closed at all
times during RFID programming.

The printer is using outdated
printer firmware.

Go to http://www.zebra.com/firmware for
updated firmware.

The printer stops at
the RFID inlay.

The printer calibrated the label
length only to the RFID inlay
instead of to the interlabel gap.

1. Perform media calibration. Refer to the User

The DATA light
flashes indefinitely
after you attempt to
download printer
firmware.

The download was not
successful. For best results,
cycle power on the printer
before downloading any
firmware.

1. Turn off (O) the printer.

RFID Values Using Tag Calibration
on page 18).
2. If the problem persists, consider using a
different tag type. Contact an authorized
Zebra RFID reseller for more information.

Guide for your printer for media calibration
instructions.
2. Run RFID tag calibration (see Setting the
RFID Values Using Tag Calibration
on page 18).
2. Wait 10 seconds.
3. Turn on (I) the printer.
4. Attempt to download the firmware again.
5. If the problem persists, contact Technical

Support.

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

41

42

Troubleshooting
RFID Problems

Table 3 • RFID Problems (Continued)
Problem

Possible Cause

Recommended Solution

RFID parameters do
not appear in Setup
mode, and RFID
information does not
appear on the printer
configuration label.

An incorrect version of
firmware was loaded on the
printer.

1. Compare the firmware version on your

The printer is unable to
communicate with the RFID
subsystem.

1. Turn off (O) the printer.

The printer does not
void RFID labels that
are not programmed
correctly.

printer to those listed in Table 1, RFID
Printer Firmware Versions, on page 14.
2. Download the correct printer firmware if
necessary.
3. If the problem persists, contact Technical
Support.
2. Wait 10 seconds.
3. Turn on (I) the printer.
4. If the problem persists, you may have a bad

RFID reader or a loose connection between
the RFID reader and the printer. Contact
Technical Support or an authorized service
technician for assistance.
RFID is disabled. The SGD
command rfid.enable is set
to "off".

P1062165-002 Rev. A

1. Change rfid.enable to "on". (See

rfid.enable on page 80.)
2. Restart your printer for changes to take effect.

RFID Programming Guide 3

3/13/14

Troubleshooting
RFID Error Codes and Messages

RFID Error Codes and Messages
In the event of an RFID error, the printer does the following:
• displays an RFID error or status message on the second line of the RFID STATUS
control panel display
• returns RFID error codes to the RFID data log (see ^HL or ~HL on page 48 for more
information about the RFID data log)
Table 4 lists the error codes. Numbers that appear in the format “READER ERR xxxxxxxx”
are not listed individually.
Table 4 • RFID Error Codes
Error
Code

RFID Error or
Status Message

Description/Action Required

XXXXXXXX READER ERR
XXXXXXXX

XXXXXXXX is 8 hex characters returned from the reader.
This error can indicate a read/write error with your RFID tag, or
it could indicate an internal problem with the RFID reader. If the
problem persists, contact Technical Support.

00000000 RFID OK

The RFID operation completed successfully.

02000100 DATA AMOUNT ERROR

The wrong amount of data was specified in an RFID reader
command.

02000101 INVALID OPCODE

The command sent to the RFID reader module was invalid.

02000102 UNKNOWN OPCODE

The command sent to the RFID reader module is not known by
the module firmware.

02000103 RFID PWR TOO HIGH

An attempt was made to set the power of the RFID reader to a
value that is too large.

02000104 INVALID FREQUENCY

The frequency selected in an RFID command to reader module
is not valid.

02000105 INVALID PARAMETER

A parameter of an RFID command for the reader module is not
valid.

02000106 RFID PWR TOO LOW

An attempt was made to set the power of the RFID reader to a
value that is too small.

02000109 INVALID COMMAND

The command sent to the RFID reader module was invalid.

0200010A INVALID BAUD RATE

An attempt was made to set the serial communication baud rate
of the RFID reader to a value that is not valid.

0200010B INVALID REGION

An attempt was made to set the region of the RFID reader to a
value that is not valid.

0200010C BAD LICENSE KEY

The RFID reader firmware's license key does not match the
RFID reader firmware.

02000200 BAD IMAGE CRC

The RFID reader firmware had a bad validation checksum.

02000201 READER FW ERROR

An error occurred in the RFID reader module.

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

43

44

Troubleshooting
RFID Error Codes and Messages

Table 4 • RFID Error Codes (Continued)
Error
Code

RFID Error or
Status Message

02000300 RFID FLASH ERROR
02000301

Description/Action Required

An error occurred while attempting to write firmware to the
RFID reader module.

02000302
02000303
02000304
02000305
02000306
02000400 NO TAG FOUND

The reader attempted to locate an RFID tag and was unable to do
so.

02000401 PROTOCOL UNDEFINED

The RFID reader was not properly told the type of RFID tag.

02000402 INVALID PROTOCOL

The type of RFID tag that the RFID reader was told to expect is
not valid.

02000403 LOCK ERROR

An error occurred while attempting to change the lock bits on
the tag.

02000404 NO DATA READ

An attempt to read data from a tag could not find any data.

02000405 AFE NOT ON

The reader module does not have the AFE on.

02000407 NOT IMPLEMENTED

The RFID reader command that was sent to the reader is not
implemented in this version of reader firmware.

02000408 INVALID WRITE DATA

The data that was attempted to be written to a tag is not valid.

02000409 INVALID ADDRESS

The memory address for data to be written to a tag is not valid.

0200040A GENERAL TAG ERROR

Miscellaneous error while attempting to read or write to a tag.

0200040B DATA TOO LARGE

Too much data was attempted to be written to a tag.

0200040F PROT BIT DCDNG BAD

Protocol bit decoding failure.

02000410 PROTOCOL BAD EPC

The protocol definition is inconsistent with the size of the EPC
data area.

02000411 PROT BAD NUM DATA

The protocol definition is inconsistent with the amount of data
sent.

02000420 GEN2 PROTOCOL ERR

An error was made in the specification of a Generation 2 tag
protocol.

02000423 GEN2 MEMORY BAD PC

An error was made in the specification of a Generation 2 tag
protocol control bit.

02000424 GEN2 MEMORY LOCKED

The Generation 2 tag memory area is locked.

0200042B GEN2 LOW POWER

The Generation 2 tag is set to low power mode.

0200042F GEN2 ERROR

An unspecified error was made with a Generation 2 tag.

02000430 GEN2 UNKNOWN ERROR

An unknown error was made with a Generation 2 tag.

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

Troubleshooting
RFID Error Codes and Messages

Table 4 • RFID Error Codes (Continued)
Error
Code

RFID Error or
Status Message

Description/Action Required

02000500 TRANSMITTER ON

The RFID radio transmitter is on.

02000503 NO ANTENNA FOUND

The RFID reader module found that no antenna was connected.

02000504 RFID TOO HOT

The RFID reader module is too hot.

02000505 HIGH RETURN LOSS

The amount of energy being reflected by the antenna connection
is higher than acceptable.

02000507 BAD ANTENNA CFG

An attempt was made to set the reader module to an invalid
antenna configuration.

02000600 NOT ENOUGH TAGS

The RFID module memory contained data from fewer tags than
was requested by printer firmware.

02000601 TAG ID BUFFER FULL

The RFID module memory is full.

02000602 REPEATED TAG ID

An attempt was made to write data to the RFID module memory
with an ID that is already present in the memory.

02000603 TOO MANY TAG IDS

The RFID reader was asked to read more tags into module
memory than the module could hold.

02007F00 SYS UNKNOWN ERROR

A firmware routine in the RFID reader module firmware
returned an unknown error.

02007F01 TM ASSERT FAILED

An unexpected internal error has occurred in the RFID reader
module firmware.

02000101 RDR COMM TIMEOUT

An attempt to communicate with the reader module took too
much time.

00001239 ENCODER ERROR

An error occurred in the RFID encoder module firmware.

00001240 BAD RFID DATA

The data that was attempted to be written to a tag is not valid.

00001241 RFID TEST ERROR

An error occurred during an RFID test.

00001242 COUNTRY CODE ERROR

The value of the country code that was sent to the RFID reader is
not valid, or the value was not specified. See RFID Country
Code on page 22 for more information.

00001244 NO READER PRESENT

The printer does not detect an RFID reader.

02000604 BLOCKED RESPONSE

The RFID module response is blocked.

02000406 WRITE FAILED

The tag write failed.

02001238 PRINTER ERROR

The printer caused an error.

02001242 COUNTRY CODE ERROR

The RFID country code is not selected.

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

45

46

Troubleshooting
RFID Error Codes and Messages

Notes •

____________________________________________________________________

__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

6
ZPL II Commands for RFID

This section contains the ZPL II commands for RFID-specific applications.
For non-RFID ZPL commands, refer to the Programming Guide for ZPL, ZBI, Set-Get-Do,
Mirror, and WML. A copy of the manual is located on the User CD that came with your printer,
or you can download a copy from http://www.zebra.com/manuals.

Contents
^HL or ~HL Return RFID Data Log to Host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
^HR Calibrate RFID Tag Position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
^HV Host Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
^RB Define EPC Data Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
^RF Read or Write RFID Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
^RL Lock/Unlock RFID Tag Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
~RO Reset Advanced Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
^RS Set Up RFID Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
^RU Read Unique RFID Chip Serialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
^RW Set RF Power Levels for Read and Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

48

ZPL II Commands for RFID
^HL or ~HL

^HL or ~HL – Return RFID Data Log to Host
Description The printer continually logs RFID data and stores it in the printer’s RAM. This
command requests that the RFID data log be returned to the host computer, to clear the current
data log, and to restart data recording. The ~HL command is processed immediately, while the
^HL command is processed after all of the previous formats (^XA ... ^XZ) have been
processed.
Format ^HL or ~HL
In the log, RFID data displays in this format:

[RFID operation],[program position],[antenna element],
[read or write power],[RFID status],[data]
where
[RFID operation]
R = read
W = write
L = lock
E = log file reset
[program position],[antenna element],[read or write power]*
Additional information about the program position, the antenna, and the read or write
power follows the RFID operation.
Such as:
R,F1,D3,27,00000000,DATA
where F1 = the program position, D3 = the antenna, and 27 is the write power.
* With some older versions of firmware, these parameters do not display.

[RFID status]
######## = an RFID error code (see RFID Error Codes and Messages on page 43)
FFFFFFFF (or limited to length FFFF for some printers) = indicates that the log file
was reset
[data]
the data read or written
Comments
• Data is shown in the format specified by the ^RFW command (ASCII, Hex, or EPC).
• If the log exceeds 64K (approximately 1500 operations), the data log is cleared
automatically, and data recording restarts. When this happens, the following appears in the
log:
E,FFFFFFFF,Logfile automatically reset
• If the printer loses power, the log is lost. If the log results are important to you, retrieve the
information frequently.

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

ZPL II Commands for RFID
^HR

^HR – Calibrate RFID Tag Position
Description Use this command to initiate tag calibration for RFID media. During the tag
calibration process (which can take up to 5 minutes on some printers, depending on the type of
RFID inlay and the label size) the printer moves the media, reads the tag’s TID to determine
chip type, calibrates the RFID tag position, and determines the optimal settings for the RFID
media being used. Depending on the printer, these settings include the programming position,
the antenna element to use, and the read/write power level to use.
Important • Before running this command, load the printer with RFID media, calibrate your

printer, close the printhead, and feed at least one label to make sure that tag calibration will
begin from the correct position. For more information on media calibration, refer to the User
Guide for your printer.
Leave all transponders before and after the tag that is being calibrated. This allows the printer
to determine RFID settings which do not encode the adjacent tag. Allow a portion of media
to extend out the front of the printer to allow for backfeed during the tag calibration
procedure.
Results of the ^HR tag calibration are returned to the host computer. The "run" option in the
rfid.tag.calibrate SGD command performs the same calibration but does not create a
results table.
To restore the printer’s default programming position at any time, use the "restore" option
in the rfid.tag.calibrate SGD command (see rfid.tag.calibrate on page 92).
Format ^HRa,b,c,d
Parameters

Details

a = start string

This parameter specifies the user text to appear before the results table.
Accepted values: any string less than 65 characters
Default value: start

b = end string

This parameter specifies the user text to appear after the results table.
Accepted values: any string less than 65 characters
Default value: end

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

49

50

ZPL II Commands for RFID
^HR

Parameters

Details

c = start position

This parameter specifies the start position of the calibration range. All numeric
values are in millimeters. Forward or backward designations assume that the
label's initial position is with the leading edge at the print line.
Accepted Values:
F0 to Fxxx (where xxx is the label length in millimeters or 999, whichever
is less)
The printer feeds the label forward for the specified distance and
then begins tag calibration.

B0 to B30
The printer backfeeds the label for the specified distance and then
begins tag calibration. To account for the backfeed, allow empty
media liner to extend out of the front of the printer when using a
backward programming position.
Default value:
For the ZD500R: B20 —The printer backfeeds 20 mm before starting
transponder calibration.
For the ZT400 Series with RFID option: B30 —The printer backfeeds 30
mm before starting transponder calibration.

d = end position

This parameter specifies the end position of the calibration range (last program
position to check). All numeric values are in millimeters. Forward or backward
designations assume that the label's initial position is with the leading edge at
the print line.
Accepted Values:
F0 to Fxxx (where xxx is the label length in millimeters or 999, whichever
is less)
The printer performs tag calibration until it reaches the specified end
position and then ends the process.

B0 to B30
The printer performs tag calibration until it reaches the specified end
position and then ends the process. Valid only with a backward start
position that is greater than the end position.
A = Automatic
The printer automatically ends the tag calibration process after
successfully reading and encoding a consecutive range of 5 mm on
the label. The printer also ensures that no other tags can be
programmed at the programming position with the calibrationdetermined power levels.
Default value: A

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

ZPL II Commands for RFID
^HR

Parameters

Details

e = antenna and
read/write power
level detection

This parameter specifies whether to select the antenna and read/write power
levels automatically or manually.
Note • The ZD500R printer has only one antenna, so this parameter
applies only to the read/write power level settings.
Accepted Values:
A = Automatic. The printer automatically scans through the antennas and
read/write power during calibration.

M = Manual. The printer uses the current antenna and read/write power
level settings.
Default value: A

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

51

52

ZPL II Commands for RFID
^HR

Example 1 • When the ^HR command is sent to the printer, the printer performs tag

calibration and returns a results table such as the following:
start
position=B14 MM,A1,18,25
tid information=E200.3414:Alien
leading edge
Tag 1 ,Tag 2 ,Tag 3 ,Tag 4 ,Tag 5
EPC,7109
,BA29
,6FD0
,58AE
,9CDE
B30,A1,12,18,A1,29, ,A1, , ,A1, , ,A1, ,
B29,A1,13,18,A1,25, ,A1, , ,A1, , ,A1, ,
B28,A1,15,20,A1,23,29,A1, , ,A1, , ,A1, ,
B27,A1,17,22,A1,23,29,A1, , ,A1, , ,A1, ,
B26,A1,19,25,A1, , ,A1, , ,A1, , ,A1, ,
B25,A1,22,28,A1,22,27,A1, , ,A1, , ,A1, ,
B24,A1,26, ,A1,13,19,A1, , ,A1, , ,A1, ,
B23,A1, , ,A1,08,14,A1, , ,A1, , ,A1, ,
B22,A1, , ,A1,05,11,A1, , ,A1, , ,A1, ,
B21,A1, , ,A1,05,11,A1, , ,A1, , ,A1, ,
B20,A1, , ,A1,06,12,A1, , ,A1, , ,A1, ,
B19,A1, , ,A1,08,15,A1, , ,A1, , ,A1, ,
B18,A1, , ,A1,15,22,A1, , ,A1, , ,A1, ,
B17,A1, , ,A1,22,28,A1, , ,A1, , ,A1, ,
B16,A1, , ,A1,16,23,A1, , ,A1, , ,A1, ,
B15,A1, , ,A1,13,19,A1, , ,A1, , ,A1, ,
B14,A1, , ,A1,12,19,A1, , ,A1, , ,A1, ,
B13,A1, , ,A1,14,20,A1,24,30,A1, , ,A1, ,
B12,A1, , ,A1,15,22,A1,22,29,A1, , ,A1, ,
B11,A1, , ,A1,18,25,A1,26, ,A1, , ,A1, ,
B10,A1, , ,A1,21,27,A1,26, ,A1, , ,A1, ,
B09,A1, , ,A1,24, ,A1,15,21,A1, , ,A1, ,
B08,A1, , ,A1,28, ,A1,09,15,A1, , ,A1, ,
B07,A1, , ,A1, , ,A1,06,11,A1, , ,A1, ,
B06,A1, , ,A1, , ,A1,05,11,A1, , ,A1, ,
B05,A1, , ,A1, , ,A1,05,11,A1, , ,A1, ,
B04,A1, , ,A1, , ,A1,08,14,A1, , ,A1, ,
B03,A1, , ,A1, , ,A1,12,18,A1, , ,A1, ,
B02,A1, , ,A1, , ,A1,20,26,A1, , ,A1, ,
B01,A1, , ,A1, , ,A1,18,24,A1, , ,A1, ,
F00,A1, , ,A1, , ,A1,14,21,A1, , ,A1, ,
F01,A1, , ,A1, , ,A1,13,19,A1, , ,A1, ,
F02,A1, , ,A1, , ,A1,13,19,A1,27, ,A1, ,
F03,A1, , ,A1, , ,A1,14,21,A1,26,29,A1, ,
F04,A1, , ,A1, , ,A1,17,24,A1,27, ,A1, ,
F05,A1, , ,A1, , ,A1,19,26,A1, , ,A1, ,
F06,A1, , ,A1, , ,A1,22,29,A1,23,26,A1, ,
F07,A1, , ,A1, , ,A1,26, ,A1,15,19,A1, ,
F08,A1, , ,A1, , ,A1, , ,A1,10,14,A1, ,
F09,A1, , ,A1, , ,A1, , ,A1,08,12,A1, ,
F10,A1, , ,A1, , ,A1, , ,A1,08,11,A1, ,
trailing edge
end

,Tag 1
,7109
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,
,B1, ,

,Tag 2 ,Tag 3 ,Tag 4 ,Tag 5 ,
,BA29
,6FD0
,58AE
,9CDE
,
,B1,17,24,B1, , ,B1, , ,B1, , ,
,B1,14,19,B1, , ,B1, , ,B1, , ,
,B1,09,15,B1, , ,B1, , ,B1, , ,
,B1,08,14,B1, , ,B1, , ,B1, , ,
,B1,09,15,B1,28, ,B1, , ,B1, , ,
,B1,11,18,B1,26, ,B1, , ,B1, , ,
,B1,15,21,B1,27, ,B1, , ,B1, , ,
,B1,18,24,B1, , ,B1, , ,B1, , ,
,B1,21,28,B1,19,24,B1, , ,B1, , ,
,B1,25, ,B1,11,17,B1, , ,B1, , ,
,B1,30, ,B1,07,13,B1, , ,B1, , ,
,B1, , ,B1,05,11,B1, , ,B1, , ,
,B1, , ,B1,05,10,B1, , ,B1, , ,
,B1, , ,B1,05,11,B1, , ,B1, , ,
,B1, , ,B1,07,13,B1, , ,B1, , ,
,B1, , ,B1,13,20,B1, , ,B1, , ,
,B1, , ,B1,18,23,B1, , ,B1, , ,<---****A1
,B1, , ,B1,10,16,B1, , ,B1, , ,
,B1, , ,B1,08,14,B1, , ,B1, , ,
,B1, , ,B1,08,14,B1, , ,B1, , ,
,B1, , ,B1,11,17,B1,26, ,B1, , ,
,B1, , ,B1,14,20,B1,25, ,B1, , ,
,B1, , ,B1,17,23,B1, , ,B1, , ,
,B1, , ,B1,20,26,B1,27,30,B1, , ,
,B1, , ,B1,24,30,B1,16,19,B1, , ,
,B1, , ,B1,28, ,B1,10,14,B1, , ,
,B1, , ,B1, , ,B1,07,11,B1, , ,
,B1, , ,B1, , ,B1,06,11,B1, , ,
,B1, , ,B1, , ,B1,06,10,B1, , ,
,B1, , ,B1, , ,B1,09,13,B1, , ,
,B1, , ,B1, , ,B1,12,17,B1, , ,
,B1, , ,B1, , ,B1,20,25,B1, , ,
,B1, , ,B1, , ,B1,16,20,B1, , ,
,B1, , ,B1, , ,B1,11,16,B1, , ,
,B1, , ,B1, , ,B1,11,15,B1, , ,
,B1, , ,B1, , ,B1,12,16,B1,25, ,
,B1, , ,B1, , ,B1,15,18,B1,23,28,
,B1, , ,B1, , ,B1,17,22,B1,23,29,
,B1, , ,B1, , ,B1,20,25,B1, , ,
,B1, , ,B1, , ,B1,24,28,B1,21,26,
,B1, , ,B1, , ,B1,27, ,B1,13,18,

In the results table, the tags visible to the antenna elements are numbered, and the EPC
number that is unique to each tag is displayed.
Each line in the results table gives a row number followed by readings associated with RFID
tags that are visible at that row. Multiple values on a line indicate that multiple tags were
visible. The order of the RFID tags is arbitrary.

[Row],[Antenna Element],[Min Read Power],[Min Write Power],
[Antenna Element],[Min Read Power],[Min Write Power] ...

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

ZPL II Commands for RFID
^HR

where
• Row = the position from the leading edge of the label where calibration occurred
• Antenna Element = the antenna used (the ZD500R only has A1)
• Minimum Read Power = calibration results (0 – 30) for a tag visible from that row
• Minimum Write Power = calibration results (0 – 30) for the same tag
The read and write power values are left empty (such as A1, , ,) when no tag is found.
In the sample results table for this example, at position B25 (25 mm behind the print line),
two RFID tags are visible to the printer at antenna A1. Tag 1 (EPC 7109) can be read at
power level 22 and written to at power level 28. Tag 2 (EPC BA29) can be read at power
level 22 and written to at power level 27. At that position, Tags 2 and 3 are visible to antenna
B1 while Tag 1 is not.
Tag 1 ,Tag 2 ,Tag 3
EPC,7109
,BA29
,6FD0
...
B25,A1,22,28,A1,22,27,A1, ,
B24,A1,26, ,A1,13,19,A1, ,
B23,A1, , ,A1,08,14,A1, ,
B22,A1, , ,A1,05,11,A1, ,
B21,A1, , ,A1,05,11,A1, ,
...

,Tag 4
,58AE
,A1,
,A1,
,A1,
,A1,
,A1,

,Tag 5
,9CDE
,
,
,
,
,

,A1,
,A1,
,A1,
,A1,
,A1,

,
,
,
,
,

,Tag 1
,7109

,Tag 2
,BA29

,B1,
,B1,
,B1,
,B1,
,B1,

,B1,11,18,B1,26, ,B1,
,B1,15,21,B1,27, ,B1,
,B1,18,24,B1, , ,B1,
,B1,21,28,B1,19,24,B1,
,B1,25, ,B1,11,17,B1,

,
,
,
,
,

,Tag 3
,6FD0

,Tag 4
,58AE
,
,
,
,
,

,Tag 5
,9CDE

,
,

,B1,
,B1,
,B1,
,B1,
,B1,

,
,
,
,
,

,
,
,
,
,

At position B23, only Tag 2 is visible to antenna A1. Tag 1 is no longer visible.
Tag 1 ,Tag 2 ,Tag 3
EPC,7109
,BA29
,6FD0
...
B25,A1,22,28,A1,22,27,A1, ,
B24,A1,26, ,A1,13,19,A1, ,
B23,A1, , ,A1,08,14,A1, ,
B22,A1, , ,A1,05,11,A1, ,
B21,A1, , ,A1,05,11,A1, ,
...

,Tag 4
,58AE
,A1,
,A1,
,A1,
,A1,
,A1,

,Tag 5
,9CDE
,
,
,
,
,

,A1,
,A1,
,A1,
,A1,
,A1,

,
,
,
,
,

,Tag 1
,7109

,Tag 2
,BA29

,B1,
,B1,
,B1,
,B1,
,B1,

,B1,11,18,B1,26, ,B1,
,B1,15,21,B1,27, ,B1,
,B1,18,24,B1, , ,B1,
,B1,21,28,B1,19,24,B1,
,B1,25, ,B1,11,17,B1,

,
,
,
,
,

,Tag 3
,6FD0

,Tag 4
,58AE
,
,
,
,
,

,Tag 5
,9CDE
,B1,
,B1,
,B1,
,B1,
,B1,

,
,
,
,
,
,
,

,
,
,
,
,

At position B13, Tag 3 (EPC 6FD0) becomes visible to antenna A1 and can be read with at
power level 24 and written to at power level 30.
Tag 1
EPC,7109
...
B16,A1, ,
B15,A1, ,
B14,A1, ,
B13,A1, ,
...

,Tag 2
,BA29

,Tag 3
,6FD0

,Tag 4
,58AE

,A1,16,23,A1, , ,A1,
,A1,13,19,A1, , ,A1,
,A1,12,19,A1, , ,A1,
,A1,14,20,A1,24,30,A1,

,
,
,
,

,Tag 5
,9CDE

,Tag 1
,7109

,Tag 2
,BA29

,A1,
,A1,
,A1,
,A1,

,B1,
,B1,
,B1,
,B1,

,B1,
,B1,
,B1,
,B1,

,
,
,
,

,
,
,
,

,Tag 3
,6FD0
,
,
,
,

,Tag 4
,58AE

,B1,07,13,B1,
,B1,13,20,B1,
,B1,18,23,B1,
,B1,10,16,B1,

,Tag 5
,9CDE
,
,
,
,

,B1,
,B1,
,B1,
,B1,

,
,
,
,
,
,

,
,
,<---****A1
,

The arrow (<---****) in the table indicates that a valid program position and power levels
were found during calibration. The program position is identified at the top of the table as
position=B14 MM (backfeed 14 millimeters). The optimal antenna element at that
position is A1. The optimal read power is 18, and the optimal write power is 25.
start
position=B14 MM,A1,18,25
tid information=E200.3414:Alien
leading edge
...
B14,A1, , ,A1,12,19,A1, , ,A1, , ,A1, , ,B1, , ,B1, , ,B1,18,23,B1, , ,B1, , ,<---****A1
...

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

53

54

ZPL II Commands for RFID
^HV

^HV – Host Verification
Description Use this command to return data from specified fields, along with an optional
ASCII header, to the host computer. You can use this command with any field that has been
assigned a number with the ^FN and ^RF commands.
Format ^HV#,n,h,t,a
This table identifies the parameters for this format:
Parameters

Details

# = field number
specified with
another command

The value assigned to this parameter should be the same as
the one used in another command.
Accepted Values: 0 to 9999
Default Value: 0

n = number of bytes to be
returned

Accepted Values: 1 to 256
Default Value: 64

h = header to be returned
with the data

Delimiter characters terminate the string. This field is Field
Hex (^FH) capable.
Accepted Values: 0 to 3072 bytes
Default Value: no header

t = termination

This field is Field Hex (^FH) capable.
Accepted Values: 0 to 3072 characters

a = command applies to

When ^PQ is greater than 1 or if a void label occurs, send one
response for a label format or one for every label printed.
Accepted Values:
F = Format

L = Label
Default Value: F
Example • The following code:

^XA
.
.
.
^FH_^HV0,8,EPC[,]_0D_0A,L^FS
^PQ2
^XZ
Would return data such as this:

EPC[12345678]
EPC[55554444]

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

ZPL II Commands for RFID
^RB

^RB – Define EPC Data Structure
Description Use this command to define the structure of EPC data, which can be read from
or written to an RFID tag. For more information about EPC specifications, refer to the EPC
Global web site. All parameters in this command are persistent and will be used in subsequent
formats if not provided. The values are initially set to the default values.
RFID tags can have different partitions defined. This command specifies the number of
partitions and how many bits are in each partition.
Format ^RBn,p0,p1,p2, ..., p15
Parameters

Details

n = total bit size of the
partitions

Specify the number of bits to include in the partitions.
Accepted values: 1 to n, where n is the bit size of the tag.
Default value: 96

p0 ... p15 =
partition sizes

Specify the number of bits to include in the individual partitions. The partition
sizes must add up to the bit size specified for the previous parameter. The
largest individual partition size is 64 bits.
Accepted values: 1 to 64
Default value: 1

Example 1 • The following command specifies that there are 96 bits used with three fields.

Fields 1, 2, and 3 contain 10, 26, and 60 bits, respectively.

^RB96,10,26,60
The ZPL code to encode a tag with this format would look like this:

^RFW,E^FD1000.67108000.1122921504606846976^FS
When the tag is being encoded, the tag stores the data in the following way:
• Field 1 contains 1000. This value is stored in the first 10 bits
• Field 2 contains 67108000. This value is stored in the next 26 bits.
• Field 3 contains 1122921504606846976. This value is stored in the remaining
60 bits.
Example 2 • The following command specifies that there are 64 bits used with eight 8-bit

fields.

^RB64,8,8,8,8,8,8,8,8^FS
The ZPL code to encode a tag with this format would look like this:

^RFW,E^FD1.123.160.200.249.6.1.0^FS
When writing to the tag, each set of data is written in its respective 8-bit field.

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

55

56

ZPL II Commands for RFID
^RB

Example 3 • This example uses the SGTIN-96 standard, which defines 96-bit structure in the
following way:

SGTIN-96

Header

Filter Value

Partition

Company
Prefix Index

Item
Reference

Serial
Number

8 bits

3 bits

3 bits

20–40 bits

24 bits

38 bits

10
(binary value)

8
(decimal
capacity)

8
(decimal
capacity)

16,383
(decimal
capacity)

9 to 1,048,575
(decimal
capacity*)

33,554,431
(decimal
capacity)

* Capacity of Item Reference field varies with the length of the company prefix.

The ZPL code to encode a tag with this format would look like this:

^XA
^RB96,8,3,3,20,24,38^FS
^RFW,E^FD48,1,6,770289,10001025,1^FS
^XZ
These commands would put
• 48 in the header
• 1 as the filter value
• 6 as the partition (indicates a 20-bit prefix and 24-bit item reference)
• 770289 as the company prefix
• 10001025 as the item reference
• 1 as the serial number
To read this EPC data and print the results on the label, you would use the following code:

^XA
^RB96,8,3,3,20,24,38^FS
^FO50,50^A0N,40^FN0^FS
^FN0^RFR,E^FS
^XZ
The resulting label would look like this:
48.1.6.770289.10001025.1

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

ZPL II Commands for RFID
^RF

^RF – Read or Write RFID Format
Description Use this command to read or write to (encode) an RFID tag or to specify the
access password.
When using this command to read a tag, you may use a field variable to print the tag data on
the label or to return the data to the host. See Create and Send an RFID Label Format
on page 32 for examples that use a field variable. See Gen 2 Memory Map on page 12 to see
how information is stored on a Gen 2 tag.
Format ^RFo,f,b,n,m
Parameters

Details

o = operation

Specifies the action to be performed.
Accepted Values:
W = write to (encode) the tag

R = read the tag
S = specify the access password
Default Value: W

f = format

Accepted Values:
A = ASCII

H = Hexadecimal
E = EPC (ensure proper setup with the ^RB command)
Default Value: H

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

57

58

ZPL II Commands for RFID
^RF

Parameters

Details

b = password

What you specify for this parameter depends on what you enter for other
parameters.

OR

b = starting block
number

If the
Operation
parameter
value is...

W

Then...

Note • When the memory bank parameter is set to

E (EPC 96-bit) or A (EPC and Auto adjust PC bits),
this value is always set to 2.
Accepted Values:
• P, which indicates that an access password, a kill
password, or both follow in a ^FD command. Each
password must be 8 hex characters. If the password is
omitted, it is not written. An access password is used in
subsequent lock commands in the format.
• 0 to n, which specifies the 16-bit starting block number,
where n is the maximum number of blocks for the bank
specified in the memory bank parameter.
Default Value: 0
R

Note • When the memory bank parameter is set to

E (EPC 96-bit) or A (EPC and Auto adjust PC bits),
this value is always set to 2.
Accepted Values:
• 0 to n, which specifies the 16-bit starting block number,
where n is the maximum number of blocks for the bank
specified in the memory bank parameter.
Default Value: 0
S
n = number of bytes to
read or write

P1062165-002 Rev. A

This parameter must be P and must be followed by the
access password in a ^FD command.

Specifies the number of bytes to read or write.
When E or A is specified for the memory bank parameter, this value is not
required.
Accepted Values: 1 to n, where n is the maximum number of bytes for the tag.
Default Value: 1

RFID Programming Guide 3

3/13/14

ZPL II Commands for RFID
^RF

Parameters

Details

m = Gen 2 memory bank

Specifies the Gen 2 memory bank. See Gen 2 Memory Map on page 12 for
more information about Gen 2 memory.
Accepted Values:
E = EPC 96-bit (When writing data, this parameter performs the
operation on Gen 2 bit address 20h and accesses 12 bytes of the EPC
memory bank. When reading data, this parameter reads the amount
of data specified in the PC bits on the tag.)

A = EPC and Auto adjust PC bits (When writing data, this parameter
performs the operation on Gen 2 bit address 20h of the EPC memory
bank and accesses the number of bytes specified in the ^FD. The PC
bits will be updated to match the amount of data written to the tag.
When reading data, this parameter reads the amount of data specified
in the PC bits on the tag.)
0 = Reserved
1 = EPC
2 = TID (Tag ID)
3 = User
Default Value: E

Example 1 • This example encodes 96-bit EPC data, as specified by the ^RB command.

^XA
^RB96,8,3,3,20,24,38
^RFW,E^FD16,3,5,78742,146165,1234567891^FS
^XZ
Example 2 • This example encodes 4 bytes of hexadecimal formatted data, starting in block 3
of Gen 2 EPC bank 1. (The ^RS command can be omitted for printers that use Gen 2 tag
types only.)

^XA
^RFW,H,3,4,1^FD11112222^FS
^XZ
Example 3 • This example reads the extended Gen 2 tag ID (TID) and returns the results to

the host computer. The results are labeled with the header “8-byte Tag ID Data.” (The ^RS
command can be omitted for printers that use Gen 2 tag types only.)

^XA
^RFR,H,0,8,2^FN1^FS^HV1,,8-byte Tag ID Data:^FS
^XZ

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

59

60

ZPL II Commands for RFID
^RF

Example 4 • This command writes and specifies both the access password (12345678) and
the kill password (88887777) separated by a comma.

^RFW,H,P^FD12345678,88887777^FS
This command writes the access password only:

^RFW,H,P^FD12345678^FS
This command writes the kill password only (a comma must be used before it to distinguish
it from an access password):

^RFW,H,P^FD,88887777^FS
See the examples for ^RL on page 61 for how this command would be used in a format.
Example 5 • This command writes 1122334455667788 to the bit address 20h of the EPC

memory and updates the PC bits bit address 10h to 14h to reflect 8 bytes (4 words) of data.

^RFW,H,,,A^FD1122334455667788^FS
Example 6 • This command specifies the access password for the tag, which will be used in

subsequent lock commands in the format. The access password specified must match the one
stored on the tag. This command does not write the password to the tag. See the examples for
^RL on page 61 for how this command would be used in a format.

^RFS,H,P^FD12345678^FS

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

ZPL II Commands for RFID
^RL

^RL – Lock/Unlock RFID Tag Memory
The ^RL command has two distinct formats and functions:
• ^RLM – Lock/Unlock the Specified Memory Bank
Locks a password or an entire memory bank in a writeable or unwriteable state. These
locks/unlocks can be permanent or reversible.
• ^RLB – Permanently Lock Specified Memory Sections
Locks blocks of user memory in an unwriteable state.

^RLM – Lock/Unlock the Specified Memory Bank
Description The ^RLM command locks/unlocks the specified password or memory bank on
an RFID tag. You can use this command to do the following:
• lock individual passwords, thereby preventing or allowing subsequent reads or writes of
that password
• lock individual memory banks, thereby preventing or allowing subsequent writes to those
banks
• Permanently lock (permalock) the lock status for a password or memory bank
Format ^RLM,k,a,e,u
Parameters

Details

k = kill password
function

Accepted Values:
U = unlock the kill password*

L = lock the kill password*
O = permanently unlock (Open) the kill password
P = permanently lock (Protected) the kill password
a = access password
function

Accepted Values:
U = unlock the access password*

L = lock the access password*
O = permanently unlock (Open) the access password
P = permanently lock (Protected) the access password
e = EPC memory bank
function

Accepted Values:
U = unlock the EPC memory bank*

L = lock the EPC memory bank*
O = permanently unlock (Open) the EPC memory bank
P = permanently lock (Protected) the EPC memory bank
* The access password must be set to something other than the default of 00000000 to use this value. See Example 4
on page 63 for an example.

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

61

62

ZPL II Commands for RFID
^RL

Parameters

Details

u = USER memory bank
function

Accepted Values:
U = unlock the USER memory bank*

L = lock the USER password bank*
O = permanently unlock (Open) the USER memory bank
P = permanently lock (Protected) the USER memory bank
* The access password must be set to something other than the default of 00000000 to use this value. See Example 4
on page 63 for an example.

^RLB – Permanently Lock Specified Memory Sections
Description The ^RLB command permanently locks (permalocks) one or more sections
(individual sub-portions) in a tag’s user memory. The section sizes for each tag is defined by
the tag manufacturer.
Format ^RLB,s,n
Parameters

Details

s = starting section

Specify the starting section of memory to lock.

n = number of sections

Specify the number of sections to lock.

Example 1 • The following command locks all memory banks using a previously specified

access password.

^RLM,L,L,L,L^FS
Example 2 • The following command locks the user memory banks using a previously

specified access password.

^RLM,,,,L^FS
Example 3 • The following command permalocks sections 0 to 4 of user memory using a

previously specified access password.

^RLB,0,4^FS

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

ZPL II Commands for RFID
^RL

Example 4 • This code does the following:

•
•
•
•

writes 12 bytes to user memory
writes “12345678” to the access password and “11223344” to the kill password
permalocks 6 sections of user memory using “12345678” as the access password
locks the kill and access passwords and permanently unlocks the EPC memory, using
“12345678” as the access password

^XA
^RFW,H,0,12,3^FD112233445566778899001122^FS
^RFW,H,P^FD12345678,11223344^FS
^RLB,0,6^FS
^RLM,L,L,O^FS
^XZ
Example 5 • This code does the following:

•
•
•

writes 12 bytes to user memory
permalocks 6 sections of user memory using “00000000” as the access password
permalocks the kill password and access password using “00000000” as the access
password

^XA
^RFW,H,0,12,3^FD112233445566778899001122^FS
^RLB,0,6^FS
^RLM,P,P^FS
^XZ

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

63

64

ZPL II Commands for RFID
~RO

~RO – Reset Advanced Counters
Description The ~RO command resets the advanced counters used by the printer to monitor
label generation in inches, centimeters, and number of labels.
Format ~ROc
Parameters

Details

c = counter number

Accepted Values:
1 = reset counter 1

2 = reset counter 2
3 = reset valid RFID label counter
4 = reset voided RFID label counter
C = reset head cleaned counter
R = reset head replaced counter and head cleaned counter
Default Value: a value must be specified or the command is ignored

Example 1 • This example shows how the counter portion of the printer configuration labels

looks when the RFID counters are reset by sending ~RO3 and ~RO4.
Before

After

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

ZPL II Commands for RFID
^RR

^RR – Enable Adaptive Antenna Selection
Description Use this command to enable the adaptive antenna element selection feature.
This command is persistent and will be used in subsequent formats if not provided.
Format ^RRn,a
Parameters

Details

n = number of retries

Reserved

a = adaptive antenna
element selection

Note •

• This feature does not apply to ZD500R printers, which always use an

antenna element value of A1.
• The label length must be 2 in. (51 mm) or greater.

If the printer cannot find RFID tags with the antenna element specified, the
printer may try neighboring antenna elements. If the printer is unsuccessful
communicating with the RFID tag after trying the neighboring antenna
elements, the printer voids the label.
Note • Activating this parameter may slow throughput on damaged or
weak RFID tags.
Accepted Values: 0 or 1
0 = None. The printer uses only the current antenna element selection.
1 = Neighbors. The printer attempts to read the tag using the antenna
elements to the left/right and above/below the current antenna
element. The antenna element that is successful is used for all
subsequent RFID commands until the next unsuccessful attempt.
Default Value: 0

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

65

66

ZPL II Commands for RFID
^RS

^RS – Set Up RFID Parameters
Use this command to set up RFID parameters including tag type; programming position; and
error handling, such as setting the number of labels that will be attempted if an error occurs.
For example, if an RFID label fails to program correctly or if the transponder cannot be
detected, the printer ejects the label and prints VOID across it. The printer will try to print
another label with the same data and format for the number of labels specified (parameter n).
If the problem persists, the printer follows the error handling instructions specified by the error
handling parameter (parameter e): the printer may remove the problematic format from the
print queue and proceed with the next format (if one exists in the buffer), or it may place the
printer in Pause or Error mode.
Use care when using this command in combination with ^RF for reading tag data. Problems
can occur if the data read from the tag is going to be printed on the label. Any data read from
the tag must be positioned to be printed above the read/write position. Failure to do this will
prevent read data from being printed on the label.
Format ^RSt,p,v,n,e,a,c,s
Parameters

Details

t = tag type

Accepted Values:
8 = EPC Class 1, Generation 2 (Gen 2)
Default value: 8—Gen 2 is the only tag type valid for this printer.

p = read/write position of
the tag
(programming
position)

This parameter sets the read/write position of the tag.
Accepted Values:
F0 to Fxxx (where xxx is the label length in millimeters or 999, whichever
is less)
The printer prints the first part of a label until it reaches the specified
distance and then begins programming. After programming, the
printer prints the remainder of the label.

B0 to B30
The printer backfeeds the label for the specified distance and then
begins programming. To account for the backfeed, allow empty
media liner to extend out of the front of the printer when using a
backward programming position.
Default value: F0 (which moves the leading edge of the label to the print line)

v = length of void
printout

Sets the length of the void printout in vertical (Y axis) dot rows.
Accepted values: 0 to label length
Default value: label length

n = number of labels to
try encoding

The number of labels that will be attempted in case of read/encode failure.
Accepted values: 1 to 10
Default value: 3

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

ZPL II Commands for RFID
^RS

Parameters

Details

e = error handling

If an error persists after the specified number of labels are tried, perform this
error handling action.
Accepted values:
N = No action (printer drops the label format causing the error and moves
to the next queued label)

P = Place printer in Pause mode (label format stays in the queue until the
user cancels)
E = Place printer in Error mode (label format stays in the queue until the
user cancels)
Default value: N
Note • You can set the printer to send an error message to the host for
each failure. To enable or disable this unsolicited error message, refer to
the ^SX and ^SQ ZPL commands. Use V for the condition type for an
RFID error.

a = signals on applicator

Not applicable.

c = reserved

Not applicable.

s = void print speed

If a label is voided, the speed at which “VOID” will be printed across the label.
Accepted values: any valid print speed
Default value: the printer’s maximum print speed

Example 1 • The following are examples of setting the programming position.

1. ^RS,F1 sets the encode position 1 mm forward from the leading edge of the label.
2. ^RS,B10 sets the encode position 10 mm backwards from the leading edge of the label.
3. ^RS,F0 sets the encode position at the leading edge of the label.
4. ^RS,B0 sets the encode position at the leading edge of the label.

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

67

68

ZPL II Commands for RFID
^RS

Example 2 • The following shows the programming position for the tag position parameter

(parameter p) with a 6-inch (152-mm, 1216-dot) label length.
print direction

encoding area
print line
tear bar

1

P1062165-002 Rev. A

1

^RS,F90, 90 mm from the leading
edge of the label

RFID Programming Guide 3

3/13/14

ZPL II Commands for RFID
^RU

^RU – Read Unique RFID Chip Serialization
Use this command to read the TID (Tag ID) data from the current chip and format a unique
38-bit serial number, which will be placed in the lower (least significant) 38 bits of the EPC
code.
Format ^RUa,b
Parameters

Details

a = prefix

Specifies the prefix in ASCII Binary
Accepted Values: Only ASCII characters 1 and 0 are accepted. Maximum of 38
characters.
The number of bits in the value specifies the length of the prefix. The prefix is
placed as the left-most (most significant) bits in the unique serial number.
If nothing is specified, the default value will be used.
Default Value: The MCS prefix is determined by the MDID in the TID of the
chip read:
• 100 = EM Micro
• Impinj = 101
• Alien = 110
• NXP = 111

b = special character

Special character for serial number inclusion.
Accepted Values: Any ASCII character other than the current Command
character, Control character, Delimiter character, or any of the Real-Time
Clock (RTC) characters.
Default Value: #

Note • Serial number inclusion:

One of several data elements can be included into any ^FD data string in the same way that
Real Time Clock data is included. Use any of the commands below to include a data pattern
based on the serial number. These are defined using the default value for the Special
Character.
#S = include 38-bit serial number derived from TID in decimal form.

#H = include 38-bit serial number derived from TID in hexadecimal form.
#E = include the entire 96-bit EPC code, including the 38-bit serial number derived from
TID in decimal form.
#F = include the entire 96-bit EPC code, including the 38-bit serial number derived from
TID in hexadecimal form.
#P = include the entire 96-bit EPC code, but use the tag’s preprogrammed, 38-bit SGTIN
serial number in decimal form.*
#Q = include the entire 96-bit EPC code, but use the tag’s preprogrammed, 38-bit SGTIN
serial number in hexadecimal form.*
* If the EPC has been preprogrammed (typically by the manufacturer) with the chip-based RFID
serialization scheme, then the serialized data does not have to be written back to the EPC memory, which
saves time. #P and #Q simply format the data that is read from the EPC memory bank.

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

69

70

ZPL II Commands for RFID
^RU

Example 1 • Read the TID from the tag, create a serial number based on the tag type, write

12000000000000 to the 96-bit EPC field, and print the
serial number (in hex format) on the label.

^XA
^RU
^FO10,10^A0N,50,50^FDSerial Number: #H^FS
^RFW,H^FD12#H^FS
^XZ
Example 2 • Read the TID from the tag, create a serial number based on the tag type, write the
serial number to the EPC field (lower 38 bits) while maintaining the contents of the rest of
the EPC memory, print Serial Number:  on the
label, and return Serial Number:  to the host.
Perform this operation on three label formats.

^XA
^RU
^FO10,10^A0N,50,50^FN1^FS
^FN1^FDSerial Number: #H^FS
^FH^HV1,24, ,_0D_0A,L^FS
^RFW,H^FD#F^FS
^PQ3
^XZ
Example 3 • Read the full EPC (already serialized) from the tag, print

Serial Number:  on the label, and return
Serial Number:  to the host.

^XA
^RU
^FO10,10^A0N,50,50^FN1^FS
^FN1^FDSerial Number: #P^FS
^FH^HV1,44, ,_0D_0A,L^FS
^XZ

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

ZPL II Commands for RFID
^RW

^RW – Set RF Power Levels for Read and Write
Description Use this command to set the RFID read and write power levels if the desired
levels are not achieved through RFID tag calibration. If not enough power is applied, the tag
may not have sufficient power for programming, and tag data will fail to encode. If too much
power is applied, the extra power may cause data communication errors or may cause the
wrong tag to be programmed.
Important • For Japan, the printer’s maximum RFID read and write power are limited to

comply with local radio regulations. Any power setting of 24 or higher results in the same
output.
Note • During RFID tag calibration, the printer automatically selects the best read/write
power levels and the best antenna element (not applicable to the ZD500R) for the media
being used. Some printers may also set the levels during an adaptive antenna sweep. Use the
~HL command (see ^HL or ~HL on page 48) to view the antenna element and power settings
being used.

Format ^RWr,w,a

Parameters

Details

r = read power

This parameter sets the power level to match the desired output as calibrated in
the factory.
Values: 0 to 30
Default Value: 16

w = write power

This parameter sets the power level to match the desired output as calibrated in
the factory.
Values: 0 to 30
Default Value: 16

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

71

72

ZPL II Commands for RFID
^RW

Parameters

a = RFID antenna
element selection

Details
Note • This parameter does not apply to ZD500R printers, which always
use an antenna element value of A1. A ZT400 Series printer is shown in
the example below.

This parameter selects an antenna element from the printer’s antenna array.
Accepted Values:
A1, A2, A3, A4
B1, B2, B3, B4
C1, C2, C3, C4
D1, D2, D3, D4
E1, E2, E3, E4

Default Value: A4

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

7
SGD Commands for RFID

This section contains the Set/Get/Do (SGD) commands for RFID-specific applications.
For non-RFID SGD commands, refer to the Programming Guide for ZPL, ZBI, Set-Get-Do,
Mirror, and WML. A copy of the manual is located on the User CD that came with your printer,
or you can download a copy from http://www.zebra.com/manuals.

Contents
odometer.rfid.valid_resettable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
odometer.rfid.void_resettable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.adaptive_antenna. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.antenna_sweep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.country_code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.error.response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.hop_table_version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.position.program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.reader_1.antenna_port. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.reader_1.firmware_version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.reader_1.hardware_version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.reader_1.model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.reader_1.power.read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.reader_1.power.write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.region_code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.tag.calibrate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.tag.read.content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.tag.read.execute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.tag.read.result_line1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.tag.read.result_line1_alternate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.tag.read.result_line2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rfid.tag.read.result_line2_alternate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3/13/14

RFID Programming Guide 3

75
76
77
78
79
80
81
82
83
84
86
87
88
89
90
91
92
93
94
95
96
97
98

P1062165-002 Rev. A

74

SGD Commands for RFID

Contents (Continued)
rfid.tag.test.content. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
rfid.tag.test.execute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
rfid.tag.test.result_line1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
rfid.tag.test.result_line2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

SGD Commands for RFID
odometer.rfid.valid_resettable

odometer.rfid.valid_resettable
Description This command resets the RFID valid label counter to zero.
Type getvar; setvar
This table identifies the command for this format:
Commands

Details

setvar

This command instructs the printer to set the RFID valid counter to zero.
Format: ! U1 setvar "odometer.rfid.valid_resettable" "value"
Values: “0”

getvar

This command instructs the printer to respond with the current RFID valid counter value.
Format: ! U1 getvar "odometer.rfid.valid_resettable"
Example • This setvar example shows how the counter portion of the printer configuration

labels looks when the RFID valid counter is reset by sending:

! U1 setvar "odometer.rfid.valid_resettable" "0"
Before

After

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

75

76

SGD Commands for RFID
odometer.rfid.void_resettable

odometer.rfid.void_resettable
Description This command resets the RFID void label counter to zero.
Type setvar; getvar
This table identifies the command for this format:
Commands

Details

setvar

This command instructs the printer to set the RFID void counter to zero.
Format: ! U1 setvar "odometer.rfid.void_resettable" "value"
Values: “0”

getvar

This command instructs the printer to respond with the current RFID void counter value.
Format: ! U1 getvar "odometer.rfid.void_resettable"
Example • This setvar example shows how the counter portion of the printer configuration

labels looks when the RFID void counter is reset by sending:

! U1 setvar "odometer.rfid.valid_resettable" "0"
Before

After

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

SGD Commands for RFID
rfid.adaptive_antenna

rfid.adaptive_antenna
Description This command enables or disables adaptive antenna selection.
If the printer cannot find RFID tags with the antenna element specified, the printer may try
neighboring antenna elements. If the printer is unsuccessful communicating with the RFID tag
after trying the neighboring antenna elements, the printer voids the label.
Type setvar; getvar
Commands

Details

setvar

Enables or disables the adaptive antenna feature.
Note •

•
Note •

• This feature does not apply to ZD500R printers, which always use an antenna

element value of A1.
• The label length must be 2 in. (51 mm) or greater.
• Activating this feature may slow throughput on damaged or weak RFID tags.
Format: ! U1 setvar "rfid.adaptive_antenna" "value"
Values:
none = The printer uses only the current antenna element selection.
neighbors = The printer attempts to read the tag using the antenna elements to the
left/right and above/below the current antenna. The antenna element that is
successful is used for all subsequent RFID commands until the next unsuccessful
attempt.
Default Value: none

getvar

3/13/14

Retrieves the current adaptive antenna setting.
Format: ! U1 getvar "rfid.adaptive_antenna"

RFID Programming Guide 3

P1062165-002 Rev. A

77

78

SGD Commands for RFID
rfid.antenna_sweep

rfid.antenna_sweep
Description This command enables/disables the antenna sweep feature.
If the RFID media loaded in the printer is known to be in range of an antenna at the F0
programming position, you can avoid RFID calibration by using the RFID antenna sweep
feature. With this feature enabled, when the first RFID format is sent after a printer powerup or
printhead close, the printer scans through the antennas to find the optimal antenna element.
Type setvar; getvar
Commands

Details

setvar

Enables or disables the antenna sweep feature.
Note •

• This feature does not apply to ZD500R printers, which always use an antenna

element value of A1.
• The label length must be 2 in. (51 mm) or greater, and the programming position
must be F0.
Format: ! U1 setvar "rfid.antenna_sweep" "value"
Values: on, off
Default Value: on

getvar

Retrieves the current antenna sweep setting.
Format: ! U1 getvar "rfid.adaptive_antenna"

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

SGD Commands for RFID
rfid.country_code

rfid.country_code
Description This command sets or returns the RFID reader country code. The country code
is restricted based on the region code assigned to the reader and, in some instances, cannot be
modified. You can check the countries available for your region through the control panel
menu items on your printer.
Type setvar; getvar
Commands

Details

setvar

Sets the RFID reader’s current country code.
Format: ! U1 setvar "rfid.country_code" "value"
Values: The country code choices available will vary depending on the region for which
your printer is configured.

getvar

Retrieves the RFID reader’s current country code.
Format: ! U1 getvar "rfid.country_code"

Example • In this example, the setvar sets the country code to USA/Canada.

! U1 setvar "rfid.country_code" "usa/canada"

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

79

80

SGD Commands for RFID
rfid.enable

rfid.enable
Description This command instructs an RFID printer to enable or disable RFID
functionality. You must restart the printer for the command to take effect.
Note • When this function is set to "on," changes are made to normal printer functionality.

Loading printer defaults does NOT:
• Default the sensor select setting
• Default media tracking sensor settings
• Default label length
• Perform an auto calibration
Type setvar
Commands

Details

setvar

Enables or disables RFID functionality.
Format: ! U1 setvar "rfid.enable" "value"
Values:
on = enables RFID functionality

off = disables RFID functionality
Default Value: on

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

SGD Commands for RFID
rfid.error.response

rfid.error.response
Description This command can be used to retrieve the RFID status, including any error
codes or messages. See RFID Error Codes and Messages on page 43 for more information.
Type getvar
\

Commands

Details

getvar

Retrieves any active RFID error messages.
Format: ! U1 getvar "rfid.error.response"
Example • This getvar example shows responses that you may get in different situations:

! U1 getvar "rfid.error.response"
If no RFID tag is present, you get the following response:

NO TAG FOUND
If an RFID tag is present and there are no errors, you get the following response:

RFID OK

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

81

82

SGD Commands for RFID
rfid.hop_table_version

rfid.hop_table_version
Description This command retrieves the RFID reader’s hop table version.
Type getvar
Commands

Details

getvar

Retrieves the RFID reader’s hop table version.
Format: ! U1 getvar "rfid.hop_table_version"

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

SGD Commands for RFID
rfid.position.program

rfid.position.program
Description This command sets the read/write position of the tag (programming position).
For more information, see Using the Correct RFID Settings on page 18.
Important • If this command is used to specify a value for the programming position, this
value will be used for the programming position for all labels until a new position is specified
or until the tag calibration procedure is run.

Type setvar; getvar
Commands

Details

setvar

This command instructs the printer to set the read/write position of the RFID tag.
Format: ! U1 setvar "rfid.position.program" "value"
Values:
F0 to Fxxx (where xxx is the label length in millimeters or 999, whichever is less)
The printer prints the first part of a label until it reaches the specified distance and
then begins programming. After programming, the printer prints the remainder of
the label.

B0 to B30
The printer backfeeds the label for the specified distance and then begins
programming. To account for the backfeed, allow empty media liner to extend out
of the front of the printer when using a backward programming position.
up = move to the next value
down = move to the previous value
Default:
F0 (which moves the leading edge of the label to the print line)

getvar

This command instructs the printer to respond with the current programming position.
Format: ! U1 getvar "rfid.position.program"
Example • This example shows the programming position being set at 15 mm from the

leading edge of the label.

! U1 setvar "rfid.position.program" "F15"
When the setvar value is set to "F15", the getvar result is F15.

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

83

84

SGD Commands for RFID
rfid.reader_1.antenna_port

rfid.reader_1.antenna_port
Description This command specifies the RFID antenna to be used for RFID operation.
Note • Some printers automatically select the best antenna element and read/write power
levels for the media during RFID transponder calibration. Ty may also set the levels during
an adaptive antenna sweep. Use the ~HL command (see ^HL or ~HL on page 48) to view the
antenna element and power settings being used.

Type setvar; getvar
Commands

Details

setvar

Sets the antenna port.
Format: ! U1 setvar "rfid.reader_1.antenna_port" "value"
ZD500R:
This printer only has one antenna element, so the value used is always A1.
Default Value: A1
ZT400 Series:
This parameter selects an antenna element from the printer’s antenna array.
Accepted Values:
E1, E2, E3, E4
D1, D2, D3, D4
C1, C2, C3, C4
B1, B2, B3, B4
A1, A2, A3, A4

Default Value: A4
P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

SGD Commands for RFID
rfid.reader_1.antenna_port

Commands

Details

getvar

Retrieves the current antenna port.
Format: ! U1 getvar "rfid.reader_1.antenna_port"
Example • This setvar example shows the selection of antenna port D3.

! U1 setvar "rfid.reader_1.antenna_port" "D3"
When the setvar value is set to "D3", the getvar result is "D3".

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

85

86

SGD Commands for RFID
rfid.reader_1.firmware_version

rfid.reader_1.firmware_version
Description This command returns the RFID reader firmware version.
Type getvar
Commands

Details

getvar

Format: ! U1 getvar "rfid.reader_1.firmware_version"

Example • This example shows responses that you get in different situations:

! U1 getvar "rfid.reader_1.firmware_version"
If an RFID reader is present and connected, you get the firmware version in the following
format:

xx.xx.xx.xx
If there is no RFID reader or if the reader is not connected correctly, the response is blank.

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

SGD Commands for RFID
rfid.reader_1.hardware_version

rfid.reader_1.hardware_version
Description This command returns the RFID reader hardware version.
Type getvar
Commands

Details

getvar

Format: ! U1 getvar "rfid.reader_1.hardware_version"
Example • This example shows responses that you get in different situations:

! U1 getvar "rfid.reader_1.hardware_version"
If an RFID reader is present and connected, you get the hardware version in the following
format:

xx.xx.xx.xx
If there is no RFID reader or if the reader is not connected correctly, the response is blank.

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

87

88

SGD Commands for RFID
rfid.reader_1.model

rfid.reader_1.model
Description This command returns the printer’s RFID reader model number. Possible
values are as follows:
• M6E MICRO
Type getvar
Commands

Details

getvar

Format: ! U1 getvar "rfid.reader_1.model"

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

SGD Commands for RFID
rfid.reader_1.power.read

rfid.reader_1.power.read
Description This command sets the RFID reader power level for reading RFID tags.
Type setvar; getvar
Commands

Details

setvar

Sets the antenna’s read power level.
Format: ! U1 setvar "rfid.reader_1.power.read" "value"
Values:
0 to 30

up = increase the current value by 1
down = decrease the current value by 1
Default: 16

getvar

Retrieves the antenna’s current read power level.
Format: ! U1 getvar "rfid.reader_1.power.read"
Example • This setvar example sets the antenna to power setting 16 for reading RFID tags.

! U1 setvar "rfid.reader_1.power.read" "16"
When the setvar value is set to "16", the getvar result is 16.

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

89

90

SGD Commands for RFID
rfid.reader_1.power.write

rfid.reader_1.power.write
Description Use this command to set the RFID write power levels if the desired levels are
not achieved through RFID tag calibration. If not enough power is applied, the tag may not
have sufficient power for programming, and tag data will fail to encode. If too much power is
applied, the extra power may cause data communication errors or may cause the wrong tag to
be programmed.
Type setvar; getvar
This table identifies the command for this format:
Commands

Details

setvar

Sets the antenna’s read power level.
Format: ! U1 setvar "rfid.reader_1.power.write" "value"
Values:
0 to 30

up = increase the current value by 1
down = decrease the current value by 1
Default: 16

getvar

Retrieves the antenna’s current write power level.
Format: ! U1 getvar "rfid.reader_1.power.write"
Example • This setvar example sets the antenna to power setting 16 for writing to RFID

tags.

! U1 setvar "rfid.reader_1.power.write" "16"
When the setvar value is set to "16", the getvar result is 16.

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

SGD Commands for RFID
rfid.region_code

rfid.region_code
Description This command returns the region code assigned to the printer’s RFID device.
Possible values are as follows:
• not available
• usa/canada
• japan
• rest of world
Type getvar
Commands

Details

getvar

Retrieves the RFID region code.
Format: ! U1 getvar "rfid.region_code"

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

91

92

SGD Commands for RFID
rfid.tag.calibrate

rfid.tag.calibrate
Description Use this command to initiate tag calibration for RFID media. During the
process, the printer moves the media, calibrates the RFID tag position, and determines the
optimal settings for the RFID media being used. Depending on the printer, these settings
include the programming position, the antenna element to use, and the read/write power level
to use.
Important • Before running this command, load the printer with RFID media, calibrate your

printer, close the printhead, and feed at least one label to make sure that tag calibration will
begin from the correct position. For more information on media calibration, refer to the User
Guide for your printer.
Leave all transponders before and after the tag that is being calibrated. This allows the printer
to determine RFID settings which do not encode the adjacent tag. Allow a portion of media
to extend out the front of the printer to allow for backfeed during the tag calibration
procedure.
Type setvar
Commands

Details

setvar

Initiates tag calibration for RFID media.
Format: ! U1 setvar "rfid.tag.calibrate" "value"
Values:
restore
run
Example 1 • This setvar example restores the programming position back to the printer’s

default value.

! U1 setvar "rfid.tag.calibrate" "restore"
Example 2 • This setvar example performs RFID tag calibration.

! U1 setvar "rfid.tag.calibrate" "run"

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

SGD Commands for RFID
rfid.tag.read.content

rfid.tag.read.content
Description This command instructs the printer which data to read from the tag with the
rfid.tag.read.execute command. (See rfid.tag.read.execute on page 94.)
Type setvar, getvar
Commands

Details

setvar

Instructs the printer which data to read from the tag with the rfid.tag.read.execute
command.
Format: ! U1 setvar "rfid.tag.read.content" "value"
Values:
epc = reads the EPC data based on the EPC size specified in the RFID tag’s protocol
bits, up to 160 bits

tid information = reads the first 32 bits of the TID (Tag ID)
password status = reads the tag’s access and kill passwords
protocol bits = reads the protocol bits from the EPC memory banks and converts
that value to the EPC size
memory bank sizes = reads the EPC, TID, and user memory banks sizes
up = sets the command to the previous test
down = sets the command to the next test
Default Value: epc

getvar

3/13/14

Retrieves the current setting.
Format: ! U1 getvar "rfid.tag.read.content"

RFID Programming Guide 3

P1062165-002 Rev. A

93

94

SGD Commands for RFID
rfid.tag.read.execute

rfid.tag.read.execute
Description This command reads the data specified by the rfid.tag.read.content
command. (See rfid.tag.read.content on page 93.)
Type setvar
Commands

Details

setvar

Reads the specified data.
Format: ! U1 setvar "rfid.tag.read.execute"

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

SGD Commands for RFID
rfid.tag.read.result_line1

rfid.tag.read.result_line1
Description This command reports the results of the rfid.tag.read.execute
command.
Type getvar
Commands

Details

getvar

Retrieves the results of the rfid.tag.read.execute command.
Format: ! U1 setvar "rfid.tag.read.result_line1"

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

95

96

SGD Commands for RFID
rfid.tag.read.result_line1_alternate

rfid.tag.read.result_line1_alternate
Description This command reports the results of the rfid.tag.read.execute
command.
Type getvar
Commands

Details

getvar

Retrieves the results of the rfid.tag.read.execute command.
Format: ! U1 setvar "rfid.tag.read.result_line1_alternate"

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

SGD Commands for RFID
rfid.tag.read.result_line2

rfid.tag.read.result_line2
Description This command reports the results of the rfid.tag.read.execute
command.
Type getvar
Commands

Details

getvar

Retrieves the results of the rfid.tag.read.execute command.
Format: ! U1 setvar "rfid.tag.read.result_line2"

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

97

98

SGD Commands for RFID
rfid.tag.read.result_line2_alternate

rfid.tag.read.result_line2_alternate
Description This command reports the results of the rfid.tag.read.execute
command.
Type getvar
Commands

Details

getvar

Retrieves the results of the rfid.tag.read.execute command.
Format: ! U1 setvar "rfid.tag.read.result_line2_alternate"

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

SGD Commands for RFID
rfid.tag.test.content

rfid.tag.test.content
Description This command instructs the printer which test to perform on the tag with the
rfid.tag.test.execute command. (See rfid.tag.test.execute on page 100.)
Type setvar, getvar
Commands

Details

setvar

Instructs the printer which test to perform on the tag with the rfid.tag.test.execute
command.
Format: ! U1 setvar "rfid.tag.test.content" "value"
Values:
quick = performs a read EPC test and a write EPC test (using random data)

read = performs a read EPC test
write = performs a write EPC test (using random data)
up = sets the command to the previous test
down = sets the command to the next test
Default Value: quick

getvar

3/13/14

Retrieves the current setting.
Format: ! U1 getvar "rfid.tag.test.content"

RFID Programming Guide 3

P1062165-002 Rev. A

99

100

SGD Commands for RFID
rfid.tag.test.execute

rfid.tag.test.execute
Description This command tests the data specified by the rfid.tag.test.content
command. (See rfid.tag.test.content on page 99.)
Type setvar
Commands

Details

setvar

Tests the specified data.
Format: ! U1 setvar "rfid.tag.test.execute"

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

SGD Commands for RFID
rfid.tag.test.result_line1

rfid.tag.test.result_line1
Description This command reports the results of the rfid.tag.test.execute
command.
Type getvar
Commands

Details

getvar

Retrieves the results of the rfid.tag.test.execute command.
Format: ! U1 setvar "rfid.tag.test.result_line1"

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

101

102

SGD Commands for RFID
rfid.tag.test.result_line2

rfid.tag.test.result_line2
Description This command reports the results of the rfid.tag.test.execute
command.
Type getvar
Commands

Details

getvar

Retrieves the results of the rfid.tag.test.execute command.
Format: ! U1 setvar "rfid.tag.test.result_line2"

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

Index

A

D

adaptive antenna element selection
enable using SGD, 77
enable using ZPL, 65
adjust RFID settings, 22
advanced counter reset, 64
antenna element
select using ZPL, 72
ways to set, 24
antenna sweep, 78

data log for RFID, 48
default programming position
how to restore, 19
when printer returns to the default, 18
define EPC data structure (^RB), 55
display results of certain commands
rfid.tag.read.result_line1, 95
rfid.tag.read.result_line1_alternate, 96
rfid.tag.read.result_line2, 97
rfid.tag.read.result_line2_alternate, 98
rfid.tag.test.result_line1, 101
rfid.tag.test.result_line2, 102
download firmware, 14

C
calibration
using SGD, 92
using ZPL (^HR), 49
when to perform, 18
chip serialization, 69
counter reset
by ZPL (~RO), 64
SGD for RFID valid label counter, 75
SGD for RFID void label counter, 76
country code, 79
creating basic label formats, 32

E
Electronic Product Code (EPC)
define EPC data structure (^RB), 55
EPC structure in RFID labels, 11
Gen 2 overview, 11
overview, 10
electrostatic discharge (ESD), 17
environmental conditions for RFID labels, 17
error handling, 67

F
FCC radiation exposure limits, 2
firmware upgrades, 14
firmware version of RFID reader, 86
foil RFID media, 17

3/13/14

RFID Programming Guide 3

P1062165-002 Rev. A

104

Index

G

R

Gen 2
memory map, 12
overview, 11

radiation exposure limits, 2
radio frequency interference, 17
read power
change using SGD, 89
change using ZPL (^RW), 71
set during tag calibration, 18
view or set through user menu, 28
ways to set, 26
read RFID data
read RFID format (^RF), 57
SGD to read data, 94
SGD to set data to read, 93
through user menu, 27
ways to perform, 23
read unique RFID chip serialization, 69
read/write position, 24
region code, 91
reset advanced counter, 64
return data to host computer (^HV), 54
return RFID data log to host, 48
RFID counters
reset valid label counter by SGD, 75
reset void counter by SGD, 76
resetting by ZPL, 64
RFID label formats, 32
RFID labels
placement after encoding, 17
purchasing, 15
storage requirements, 17
RFID reader
country code, 79
firmware version, 86
hardware version, 87
model number, 88
region code, 91
RFID settings, 22
RFID setup command (^RS), 66
RFID status
view through user menu, 27
ways to view, 22
RFID test
initiate through user menu, 28
SGD to set data to read, 99
SGD to set data to test, 100
ways to perform, 23

H
hardware version of RFID reader, 87
hop table version, 82
host verification command (^HV), 54

I
inlays, 15
interference from other RF products, 17

L
label formats for RFID, 32
label placement, 17
labels (purchasing RFID labels), 15
liability, 2
lock tag memory or passwords, 61
log file for RFID, 48

M
media (purchasing RFID labels), 15
memory bank locking, 61
memory map for Gen 2 tags, 12
metal-based RFID media, 17
model number of RFID reader, 88

P
password locking, 61
permalock tag memory or passwords, 61
placement of labels on items after encoding, 17
programming position
set during tag calibration, 18
set manually using SGD, 83
set manually using ZPL (^RS), 66
view or set through user menu, 28
ways to set, 24

P1062165-002 Rev. A

RFID Programming Guide 3

3/13/14

Index

S

V

sample RFID label formats, 33
serialization, 69
set up RFID information (^RS), 66
SGTIN-96 standard
chip serialization, 69
programming example, 56

valid RFID label counter
reset by SGD, 75
reset by ZPL, 64
view or reset through user menu, 29
ways to reset, 26
void handling, 66
void RFID label counter
reset by SGD, 76
reset by ZPL, 64
view or reset through user menu, 29
ways to reset, 26

T
tag calibration
initiate through user menu, 27
using SGD, 92
using ZPL (^HR), 49
ways to initiate, 22
when to perform, 18
tag placement, 15
temperature requirements for RFID labels, 17
testing RFID labels before purchase, 15
transponders
characteristics, 15
description, 10
placement guidelines, 16
placement in labels, 15
troubleshooting
RFID error codes and messages, 43
RFID problems, 40

U
unique RFID chip serialization, 69

3/13/14

W
water effect on RF signals, 17
write power
change using SGD, 90
change using ZPL (^RW), 71
set during tag calibration, 18
view or set through user menu, 29
ways to set, 26
write RFID format (^RF), 57

Z
Zebra Programming Language (ZPL II)
^HL or ~HL, Return RFID Data Log to Host, 48
^HR, Calibrate RFID Tag Position, 49
^RB, Define EPC Data Structure, 55
^RF, Read or Write RFID Format, 57
^RL, Lock/Unlock RFID Tag Memory, 61
^RS, RFID Setup, 66
^RU, read unique RFID chip serialization, 69
^RW, Set RF Power Levels for Read and Write, 71

RFID Programming Guide 3

P1062165-002 Rev. A

105

Zebra Technologies Corporation
Zebra Technologies Corporation
475 Half Day Road, Suite 500
Lincolnshire, IL 60069 USA
T: +1 847 634 6700
Toll-free +1 866 230 9494
F: +1 847 913 8766
Zebra Technologies Europe Limited
Dukes Meadow
Millboard Road
Bourne End
Buckinghamshire, SL8 5XF, UK
T: +44 (0)1628 556000
F: +44 (0)1628 556001
Zebra Technologies Asia Pacific, LLC
120 Robinson Road
#06-01 Parakou Building
Singapore 068913
T: +65 6858 0722
F: +65 6885 0838
http://www.zebra.com

© 2014 ZIH Corp.
P1062165-002 Rev. A



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.6
Linearized                      : No
Author                          : Zebra Technologies Corp.
Create Date                     : 2014:03:13 10:26:59Z
Modify Date                     : 2014:03:13 10:35:51-05:00
Has XFA                         : No
XMP Toolkit                     : Adobe XMP Core 5.4-c005 78.147326, 2012/08/23-13:03:03
Format                          : application/pdf
Title                           : RFID Programming Guide 3
Creator                         : Zebra Technologies Corp.
Creator Tool                    : FrameMaker 11.0
Metadata Date                   : 2014:03:13 10:35:51-05:00
Producer                        : Acrobat Distiller 11.0 (Windows)
Document ID                     : uuid:bdd31a50-2a7c-4700-9c40-7cc834769a3c
Instance ID                     : uuid:2a08cbe5-03e6-4a65-9a81-3053f521d372
Page Mode                       : UseOutlines
Page Count                      : 106
Warning                         : [Minor] Ignored duplicate Info dictionary
EXIF Metadata provided by EXIF.tools

Navigation menu