How to Encode or Program an RFID Tag | Everything You Need to Know - Part 1
All UHF RFID tags are delivered from each manufacturer with a string of data already encoded to the EPC memory bank and the TID memory bank.. However, just because the EPC memory for each tag arrives encoded, that doesn’t mean the tag’s pre-encoded data will work for your application. In fact, in many applications, the EPC memory needs to be rewritten or reformatted for a variety of reasons.
What is RFID Tag Encoding or Programming?
Encoding or programming an RFID tag involves writing a specific set of data or numbers onto an RFID tag’s memory bank. Like we discuss in our article ” Types of Memory in RFID Tags” there are 4 memory banks on an RFID tag – Reserved memory, EPC memory, TID memory, and User memory, and each has a specific purpose in the function of an RFID tag.
When someone programs an RFID tag, most of the time they are writing data to the EPC memory, or in a few cases, the user memory.
2 Main Reasons You Should Encode Your RFID Tags
Encoding your RFID tags becomes very important in a couple of different scenarios common in the RFID industry:
- If you purchase a roll of RFID tags that all have the same EPC number, and your application requires each tag to have a specific set of numbers.
- Your application needs a specific encoding format in order to use the tags correctly.
What if my RFID tags all have the same data (EPC number)?
Some UHF RFID tags are delivered from the manufacturer with a unique, randomized number on the EPC memory bank; however, some tags are not.
RFID is used to uniquely identify items; so, when a tag is assigned to an asset, person, or item, each ID should be unique.
For example, if two identical silver cars are on a lot (i.e. only the VINs are different), each car must have a tag with a unique EPC number so that they are able to be differentiated from one another. If there is no guarantee that an EPC number is unique from the manufacturer, the tag must be encoded with a unique number before using it. All tags have a unique identifier pre-programmed (the TID), but most RFID applications utilize the EPC memory bank instead of the TID, making it important to have a unique EPC as well.
Whether the tag’s EPC memory bank is encoded with a unique number depends on the tag manufacturer and is typically denoted on an RFID tag’s data sheet.
Tags that ARE encoded with a unique, randomized EPC number can potentially be used without being re-encoding because the chances of that number repeating are very slim.
Once you’ve received your RFID tags, simply read a few tags on a roll to confirm they are unique or repeated EPCs. Tags that are NOT encoded with a unique EPC number must be re-encoded before use.
More Information on Unique EPC Numbers
What’s the difference between a roll of tags with “randomized EPCs” and a roll of tags with “randomized, guaranteed unique” EPCs?
As the question suggests – there are some tag manufacturers that guarantee that each one of their tags made will have a unique EPC number that will never repeat. Other manufacturers use seemingly random, computer-generated numbers, that potentially could be repeated over time. You can find out which tags have which type of number by asking upon purchase.
What if I want my RFID tags to have specific numbers encoded?
Regardless of how the tag comes from the manufacturer, there are a few reasons to re-encode the EPC number with unique information. Below are a few common scenarios.
If you want to encode the EPC number as a duplicate of the item’s serial number or unique product number.
Working with an item’s serial number or unique product number helps to cut down the complexity of associating two, seemingly random numbers. This is commonly done in race timing applications by encoding each runner’s bib number as the EPC number, or, in inventory applications, by encoding the item’s unique serial number.
If you want to generate an EPC number per one of the specifications devised by GS1.
GS1 devised specifications called Identification Schemes in order for UHF RFID to be universally compatible for global trade. These schemes explain how to encode the EPC number depending on the item and use of the item. Each scheme defines the number of bits overall, and within a specific section of the string. Different segments that form the EPC number include the Header, Filter Value, the GS1 Company Prefix, Item Reference, Partition, and Serial Number. The most commonly used Identification Scheme is SGTIN-96 which stands for Serialized Global Trade Item Number, 96-bits. This encoding method is most commonly used in retail for inventory visibility.
If you want to encode the EPC number incrementing from “…1, 2, 3”.
This encoding method is the most used for our customers because it is an easy method that lets them easily visually recognize the EPC number when read instead of dealing with a long string of random numbers.
Incorporating header numbers and/or leading zeros and incrementing “from one” (or some beginning number) can be advantageous in many applications where other numbering schemes don’t fit. This encoding scheme is common for applications that don’t require specific numbers or product information available on each RFID tag.
Which RFID Tag Memory Bank Should You Encode To?
There are only two writable memory banks on a Gen2 UHF RFID tag – the EPC memory and the user memory. Because the EPC memory bank is the main writable memory on an RFID tag, by default, the RFID reader will read the EPC memory. Most RFID users and applications choose to program the EPC memory on UHF RFID tags.
If your application needs more memory than you currently have available on your tag’s EPC memory, you can either choose to:
- 1. Switch to a high-memory RFID tag.
- 2. Write additional data on the user memory bank.
Read more about high memory RFID tags in our article, RFID Tag Basics: What is High Memory?
If additional data needs to be read on the user memory, you will need to configure your RFID reader to read both memory banks on your RFID tags.
How Many Numbers/Characters Can I Encode on an RFID Tag?
In order to understand how many numbers/characters you can encode on your RFID tag, you must know which data format or character code you will be using, and the size of the encodable memory bank.
RFID Tag Data Format/Character Code
Over 97% of our clients (and likely, most RFID users) use hexadecimal encoding, also known as hex code. As mentioned above, the RFID reader/writer is expecting an input of hex code and will output data in hex code.
In order to use a different character code, like ASCII (alphanumeric), the user would have to use a piece of custom software to read/write an RFID tag (unless you want to do manual conversions). Because it is the default, we will discuss the number of characters you can encode in terms of hexadecimal character coding.
In Part 2 of this article, we break down what hex code and ASCII actually is in more detail.
RFID Tag Memory Bank Size
In order to determine how many characters you can encode on your tag; you must first determine the amount of EPC memory available. For this example, we will discuss the Avery Dennison Smartrac Dogbone with the Impinj Monza R6 IC.
If you know a tag’s IC, you will easily be able to determine the amount of encodable EPC memory. This tag has a Monza R6 IC, so if you look below at the specs, or jump to our IC Comparison Guide, you will see it has 96-bits of memory on the EPC memory bank.
In order to determine the number of hexadecimal characters you can encode on an RFID tag, simply divide the bit size by 4.
In our example tag, the Smartrac Dogbone with a Monza R6 IC and subsequently a 96-bit EPC memory bank, a user can encode up to 24 characters (96 /4 = 24). So, a user could encode on that memory bank as little as “00000001” or as much as “1234567890abcdef12345678”.
Here's a few quick bullet points for reference:
- An RFID tag with a 32-bit memory bank can hold 8 hexadecimal characters.
- An RFID tag with a 64-bit memory bank can hold 16 hexadecimal characters.
- An RFID tag with a 96-bit memory bank can hold 24 hexadecimal characters.
- An RFID tag with a 128-bit memory bank can hold 32 hexadecimal characters.
- An RFID tag with a 256-bit memory bank can hold 64 hexadecimal characters.
Conclusion
We will discuss more about Hex, ASCII, and RFID Data Formats in the second part of this article – How to Encode or Program UHF RFID Tags | Everything You Need to Know - Part 2.