Show / Hide Table of Contents

RFID Item

The RFIDItem Class

A RFIDTagItem – represented by Neodynamic.SDK.Printing.RFIDTagItem class allows you to encode RFID tags in a label object. RFIDTagItem objects are created by specifying some basic properties such as type and data to encode.

Note

RFID Tags are only available for ZPL and Fingerprint printers.

RFIDItem Samples

  • Example #1: Encoding ASCII Data

VB

'Define a ThermalLabel object and set unit to inch and label size
Dim tLabel As New ThermalLabel(UnitType.Inch, 4, 3)
tLabel.GapLength = 0.2

'Define a RFIDTagItem object
Dim rfidTag As New RFIDTagItem()
'Set data type...
rfidTag.DataFormat = RFIDTagDataFormat.ASCII
'Set data to encode...
rfidTag.DataToEncode = "My Data"

'Add items to ThermalLabel object...
tLabel.Items.Add(rfidTag)

'Create a WindowsPrintJob object
Using pj As New WindowsPrintJob()
    'Create PrinterSettings object
    Dim myPrinter As New PrinterSettings()
    myPrinter.Communication.CommunicationType = CommunicationType.USB
    myPrinter.Dpi = 203
    myPrinter.ProgrammingLanguage = ProgrammingLanguage.ZPL
    myPrinter.PrinterName = "Zebra ZD500R"

    'Set PrinterSettings to WindowsPrintJob
    pj.PrinterSettings = myPrinter
    'Print ThermalLabel object...
    pj.Print(tLabel)
End Using

CS

//Define a ThermalLabel object and set unit to inch and label size
ThermalLabel tLabel = new ThermalLabel(UnitType.Inch, 4, 3);
tLabel.GapLength = 0.2;

//Define a RFIDTagItem object
RFIDTagItem rfidTag = new RFIDTagItem();
//Set data type...
rfidTag.DataFormat = RFIDTagDataFormat.ASCII;
//Set data to encode...
rfidTag.DataToEncode = "My Data";

//Add items to ThermalLabel object...
tLabel.Items.Add(rfidTag);

//Create a WindowsPrintJob object
using (WindowsPrintJob pj = new WindowsPrintJob())
{
    //Create PrinterSettings object
    PrinterSettings myPrinter = new PrinterSettings();
    myPrinter.Communication.CommunicationType = CommunicationType.USB;
    myPrinter.Dpi = 203;
    myPrinter.ProgrammingLanguage = ProgrammingLanguage.ZPL;
    myPrinter.PrinterName = "Zebra ZD500R";

    //Set PrinterSettings to WindowsPrintJob
    pj.PrinterSettings = myPrinter;
    //Print ThermalLabel object...
    pj.Print(tLabel);
}
  • Example #2: Encoding HEX data

VB

'Define a ThermalLabel object and set unit to inch and label size
Dim tLabel As New ThermalLabel(UnitType.Inch, 4, 3)
tLabel.GapLength = 0.2

'Define a RFIDTagItem object
Dim rfidTag As New RFIDTagItem()
'Set data type...
rfidTag.DataFormat = RFIDTagDataFormat.Hexadecimal
'Set data to encode...
rfidTag.DataToEncode = "4D792044617461" 'My Data

'Add items to ThermalLabel object...
tLabel.Items.Add(rfidTag)

'Create a WindowsPrintJob object
Using pj As New WindowsPrintJob()
    'Create PrinterSettings object
    Dim myPrinter As New PrinterSettings()
    myPrinter.Communication.CommunicationType = CommunicationType.USB
    myPrinter.Dpi = 203
    myPrinter.ProgrammingLanguage = ProgrammingLanguage.ZPL
    myPrinter.PrinterName = "Zebra ZD500R"

    'Set PrinterSettings to WindowsPrintJob
    pj.PrinterSettings = myPrinter
    'Print ThermalLabel object...
    pj.Print(tLabel)
End Using

CS

//Define a ThermalLabel object and set unit to inch and label size
ThermalLabel tLabel = new ThermalLabel(UnitType.Inch, 4, 3);
tLabel.GapLength = 0.2;

//Define a RFIDTagItem object
RFIDTagItem rfidTag = new RFIDTagItem();
//Set data type...
rfidTag.DataFormat = RFIDTagDataFormat.Hexadecimal;
//Set data to encode...
rfidTag.DataToEncode = "4D792044617461"; //My Data

//Add items to ThermalLabel object...
tLabel.Items.Add(rfidTag);

//Create a WindowsPrintJob object
using (WindowsPrintJob pj = new WindowsPrintJob())
{
    //Create PrinterSettings object
    PrinterSettings myPrinter = new PrinterSettings();
    myPrinter.Communication.CommunicationType = CommunicationType.USB;
    myPrinter.Dpi = 203;
    myPrinter.ProgrammingLanguage = ProgrammingLanguage.ZPL;
    myPrinter.PrinterName = "Zebra ZD500R";

    //Set PrinterSettings to WindowsPrintJob
    pj.PrinterSettings = myPrinter;
    //Print ThermalLabel object...
    pj.Print(tLabel);
}
  • Example #3: Encoding EPC data

VB

'Define a ThermalLabel object and set unit to inch and label size
Dim tLabel As New ThermalLabel(UnitType.Inch, 4, 3)
tLabel.GapLength = 0.2

'Define a RFIDTagItem object
Dim rfidTag As New RFIDTagItem()
'Set data type...
rfidTag.DataFormat = RFIDTagDataFormat.EPC
'Set the EPC Data Structure
'TOTAL-BITS,PARTITION1-BITS,PARTITION2-BITS,...,PARTITIONn-BITS
rfidTag.EPCDataStructure = "96,8,3,3,20,24,38"
'Set data to encode...
rfidTag.DataToEncode = "16,3,5,78742,146165,1234567891"

'Add items to ThermalLabel object...
tLabel.Items.Add(rfidTag)

'Create a WindowsPrintJob object
Using pj As New WindowsPrintJob()
    'Create PrinterSettings object
    Dim myPrinter As New PrinterSettings()
    myPrinter.Communication.CommunicationType = CommunicationType.USB
    myPrinter.Dpi = 203
    myPrinter.ProgrammingLanguage = ProgrammingLanguage.ZPL
    myPrinter.PrinterName = "Zebra ZD500R"

    'Set PrinterSettings to WindowsPrintJob
    pj.PrinterSettings = myPrinter
    'Print ThermalLabel object...
    pj.Print(tLabel)
End Using

CS

//Define a ThermalLabel object and set unit to inch and label size
ThermalLabel tLabel = new ThermalLabel(UnitType.Inch, 4, 3);
tLabel.GapLength = 0.2;

//Define a RFIDTagItem object
RFIDTagItem rfidTag = new RFIDTagItem();
//Set data type...
rfidTag.DataFormat = RFIDTagDataFormat.EPC;
//Set the EPC Data Structure
//TOTAL-BITS,PARTITION1-BITS,PARTITION2-BITS,...,PARTITIONn-BITS
rfidTag.EPCDataStructure = "96,8,3,3,20,24,38";
//Set data to encode...
rfidTag.DataToEncode = "16,3,5,78742,146165,1234567891";

//Add items to ThermalLabel object...
tLabel.Items.Add(rfidTag);

//Create a WindowsPrintJob object
using (WindowsPrintJob pj = new WindowsPrintJob())
{
    //Create PrinterSettings object
    PrinterSettings myPrinter = new PrinterSettings();
    myPrinter.Communication.CommunicationType = CommunicationType.USB;
    myPrinter.Dpi = 203;
    myPrinter.ProgrammingLanguage = ProgrammingLanguage.ZPL;
    myPrinter.PrinterName = "Zebra ZD500R";

    //Set PrinterSettings to WindowsPrintJob
    pj.PrinterSettings = myPrinter;
    //Print ThermalLabel object...
    pj.Print(tLabel);
}
Back to top Copyright © 2003- Neodynamic SRL
http://www.neodynamic.com