IDAutomation RFID Component Encoder DLL
User Manual & Tutorial
A license is required for each
computer this software is installed on;
this software may only be used according to the
License Agreement. |
INDEX:
The IDAutomation RFID Encoder is a Managed Code DLL Component that enables
printing of text, barcodes (with the associated
barcode component) and
encoding of RFID smart labels at the same time from custom .NET software
applications, such as Microsoft Visual Studio .NET or Delphi for .NET.
View a list of recommended and tested
RFID printers to use
with this component.
The RFID DLL is compatible with the Microsoft .NET Framework
version 2.0 and above.
- Setup the RFID printer according to the
Encoder Setup
and Configuration suggestions.
- Copy the idautomation.rfid.dll to the
project directory.
- Add a reference to the DLL in the project or solution. For example, in
Visual Studio .NET, right click on references, choose add reference, and
choose the DLL.
- Add the appropriate code to the project; please refer to the file
"IDAutomation RFID Encoder VB.NET 2005 Application Example.zip" for a
complete working example.
- The code steps to perform in
Visual Basic or VB.NET are as follows:
'Create the RFID writer and PrintDocument objects
Private rfidWriter As New IDAutomation.Windows.Forms.RFID.RFIDComponent
Private PrintDocument1 As New System.Drawing.Printing.PrintDocument
'Set the EncoderPrefix
rfidWriter.EncoderPrefix = "^XA^RFW,H^FD"
'Set the data to be encoded in the tag
rfidWriter.DataToEncode =
"~b00811001110~b00201~b030110001000100110011111000110001~n02416522293"
'Set the EncoderSuffix
rfidWriter.EncoderSuffix = "^FS"
'Tell the PrintDocument object what printer to use
PrintDocument1.PrinterSettings.PrinterName = PrinterName
'Encode the RFID tag and print the PrintDocument object in a single print
job
rfidWriter.EncodeTagAndPrint (PrintDocument1)
When
using IDAutomation RFID products
to encode RFID tags, data may be sent directly or easily formatted. The
formatting allows variable data such as a serial number or text to be encoded in
hexadecimal with ease. Special processing is performed when a tilde character is
used to properly format the data to the tag and insure it is correct.
Special
processing of the tilde characters:
Special processing is performed when a tilde character is entered in the
DataToEncode property. This is necessary for the component to properly format
the data to the tag. The result of the processing is all converted to binary
data before it is converted to hexadecimal format. This conversion is
usually necessary to meet EPC requirements and take full advantage of every
data bit
available in the tag. When the data to be encoded does not begin with a tilde (~), the data is
sent directly to the encoder as is. When the data begins with a tilde, the
following processing operations may be performed to format the data to the
tag:
- ~b??? informs the component the data that follows is binary data
where ??? is the length of the binary data in bits.
For example, ~b00811001100 encodes 8 bits of the
binary data 11001100 in the tag, which represents the number 204.
- ~d??? allows the ASCII code of a character to be encoded in
EncoderPrefix or EncoderSuffix where ??? is a 3 digit number in decimal
format.
For example, ~d013 encodes character <CR>.
This processing is only provided in the EncoderPrefix and EncoderSuffix
properties.
- ~n??? informs the component the data that follows is variable
numeric data where ??? is the length of bits reserved for encoding this
number.
For example, ~n016170 encodes 170 which is
converted to binary as 0000000010101010. Because 16 bits are reserved for this
number, several zero bits are added to the beginning. This may be necessary
when encoding variable length serial numbers. NOTE: Because this number is
variable, a space or tilde must follow this number if data is to be encoded
after it. For example the following are all correct uses:
~n016170
~n016170~b00811001100
~n016170 11001100.
- ~x??? informs the component the data that follows is hexadecimal
data where ??? is the length of bits reserved for encoding this data. 4
bits are reserved for each character. Therefore, multiply ??? by 4 to
determine the total number of bits reserved in the tag for this command.
For example, ~x016A1C3 encodes A1C3 as
hexadecimal which is 1010000111000011 in binary format; 16 bits in length.
- ~t??? informs the component the data that follows is variable text
data to be encoded as hex bytes where ??? is the length of bits
reserved for encoding this text. This processing may be used to encode
standard text in RFID tags. Up to 12 characters may be stored in a 96 bit tag;
8 bits are required for each character.
For example, ~t032TEXT encodes the letters "TEXT"
in the tag as hexadecimal 54455854 which is 01010100010001010101100001010100
in binary format.
NOTE: Because this text is variable, a tilde must follow this number if data
is to be encoded after it. For example: ~t032TEXT~n016170
Primary Methods:
- EncodeTagAndPrint(PrintDocument) - injects the EncoderPrefix,
DataToEncode and EncoderSuffix in the print stream and prints the result of the
PrintDocument object.
Primary Properties:
- EncoderDeviceType - choose the printer or encoder if it is listed
here, default is custom. Choosing this option will automatically populate the EncoderPrefix,
EncoderSuffix and TagBitSize properties.
- DataToEncode - the data that is to be formatted and encoded in the
RFID tag. If the data begins with a tilde, the information will be formatted for
UHF tags and converted to hexadecimal format as required. If the data begins
with anything else, it will not be modified and is sent directly which is common
when encoding HF tags. When using the tilde, spaces may be entered between fields to improve readability,
however, spaces may not be entered between the tilde and the end of the data
that is to be processed by it. For example, the following is a correct use of
the space in DataToEncode:
~x008CE ~b00201 ~b030110001000100110011111000110001 ~n02416522293
- EncoderPrefix - a string that is sent directly to the printer (or
other encoding device) to inform it the type of RFID label that is being
encoded and to prepare it to encode the result of the DataToEncode property.
- EncoderSuffix - a string that is sent directly to the printer (or
other encoding device) after the DataToEncode is sent to finalize encoding of
the tag.
- PrintStartCommand - the Print Command that informs the printer to
start printing a label. If a value is present in this property, the component
injects the EncoderPrefix,
DataToEncode and EncoderSuffix in the print stream just before this value during the printing of each
label. Normally, PrintStartCommand may be left blank. However, when using
Datamax printers, Q0001 must be used or another printer command that
identifies the end of each label. When left blank, the encoder commands are
inserted just before the last line at the end of each label.
Other Properties and Methods:
- EncodeTag(PrinterName) - sends the EncoderPrefix,
DataToEncode and EncoderSuffix directly to the printer specified as a single string
without any other print information. This method should only be used when
encoding tags alone without any other data. This method also requires sending
additional data to setup the label and a print command at the end. If no print
command is used, the label will not feed.
- BinaryToEncode - the binary data that is to be encoded in the RFID
tag. This property is usually only used for troubleshooting purposes.
- BitsToEncode - the binary data that is to be encoded in the RFID
tag. This number should match the number of bits in the tag.
- ConvertBinStringToHex - converts a binary string to a hex string.
- ConvertDecStringToBinString - converts a decimal string to a binary
string.
- ConvertHexStringToBinString - converts hex data read from the tag to
a binary string.
- ConvertHexStringToDecString - converts hex data read from the
tag to a decimal (number) string.
- ConvertHexStringToTextString - converts hex data read from the
tag to a text string.
- ConvertTextStringToHex - converts a text string to hex.
- EncoderCommand - this is the actual data that is to be sent
directly to the output device. It is a combination of the EncoderPrefix, the
result of the DataToEncode and EncoderSuffix.Special characters such as <STX>
and <CR> will not be visible in the text of this property.
- HexToEncode - the hexadecimal data that is to be encoded in the
RFID tag. This property is usually only used for troubleshooting purposes.
- TagBitSize - the number of bits available in the tag for encoding.
The default value is 96.
Encoding
Examples and Support:
Additional information and examples are provided in the links below.
Please refer to the latest information in these links for anything related to RFID.
Copyright © 2004-2007 IDAutomation.com, Inc. IDAutomation is
a registered trademark of IDAutomation.com, Inc. All
other trademarks mentioned are the property of their respective owners.
|