zplCore.comzplCore.com

20RFID Studio: encode, check and simulate EPCs

EPC encoding and decoding after the GS1 EPC Tag Data Standard 2.3, implemented from the standard's text: SGTIN-96/198, SSCC-96, SGLN-96/195, GRAI-96/170, GIAI-96/202 and the TDS 2.0 schemes SGTIN+, DSGTIN+, SSCC+, SGLN+, GRAI+ and GIAI+. Plus the ^RF commands, the consistency check "does the tag carry the SSCC/GTIN that is printed?" and a Gen2 tag simulator for the virtual printer.

Try it live on zplcore.com: RFID Studio

Try it online on zplCloud.com: RFID Studio

More on zplCloud.com: Guide: ^RF

// using ZplCore.Rfid;

Epc epc = ZplRfid.EncodeEpc(EpcScheme.Sgtin96, "(01)09506000134352(21)6789", filter: 1, companyPrefixLength: 7);
Console.WriteLine(epc.Hex);          // 30364433400D1EC000001A85
Console.WriteLine(epc.TagUri);       // urn:epc:tag:sgtin-96:1.9506000.013435.6789
Console.WriteLine(epc.DigitalLinkUri); // https://id.gs1.org/01/09506000134352/21/6789

Epc sscc = ZplRfid.EncodeEpc("(00)376104250021234569", filter: 6, companyPrefixLength: 7);
string commands = ZplRfid.BuildCommands(sscc);          // ^RS8 ^RFW,H,,,A^FD31D5D080E4B2F0C4C0000000^FS
Epc decoded = ZplRfid.DecodeEpc("3074257BF7194E4000001A85"); // (01)80614141123458(21)6789
var check = ZplRfid.Check(zpl);      // does ^RF write the EPC of the printed SSCC/GTIN? (pack "rfid")
zplcore rfid encode --scheme sgtin-96 --gtin 09506000134352 --serial 6789 --company-prefix 7 --filter 1 [--format text|json|zpl]
zplcore rfid decode 3074257BF7194E4000001A85 [--pc]
zplcore rfid check label.zpl [--format sarif]          # = zplcore comply --pack rfid
zplcore rfid simulate label.zpl                        # tag memory after printing, VOID on errors
zplcore serve --rfid                                   # virtual printer with tag simulation

Errors throw EpcException with the reason (check digit, partition, filter, character …). Limits of the check: printed keys are found in GS1 symbols, Digital Link URIs, EAN/UPC and bracketed human-readable text, not as plain text without an AI; ^RS settings persist across formats on a printer and are therefore checked as advice only.