3 Replies Latest reply on Mar 14, 2017 10:30 AM by Christal Spaeth

    Alphanumerics with UCC128 barcode

    jquinton@laskoproducts.com

      I have the following zpl code

      ^FO25,215^A0,N,25,25^BCN,100,N,N,N,U^FN21^FS 

      The customer wants this barcode as a UCC 128 barcode, but their data is alphanumeric. I looked through the zpl docs and it mentions that if you pick option U for the mode it defaults to Subset C, which automatically strips out the alpha characters.

      It further mentions that I can prepend the entry with >9 or >7 to make this Subset A which allows alphanumerics. But when I try:

      ^FO25,215^A0,N,25,25^BCN,100,N,N,N,U^FN>721^FS 

      It still removes the letters from the barcode. Not only that, but it adds 7 as well. How can I get alphanumerics in my barcode?

        • Re: Alphanumerics with UCC128 barcode
          Robin West

          Hi Jermaine,

          If you just want standard Alphanumeric in a UCC128 barcode, the easiest way is to use the defaults (Subset B):

          ^FO25,25^A0,N,25,25^BCN,100,N,N,N^FD21Hello^FS

          EDIT: encodes "21Hello" in the barcode

          This will allow for alphanumerics, but will not pad out to 19 digits.

          It looks like in U mode, Subset C is not only the default, but it is the only character option.  The alpha characters are always stripped to allow for correct numeric padding.

           

          Subset A is tricky to deal with because of the numeric pairs you have to give as data. To encode the string "21H", you have to enter ^FD>9181740^FS

          Note I changed the ^FN to an ^FD to show the field with alphanumeric data. ^FN is used to specify a field in a format, not data.

            • Re: Alphanumerics with UCC128 barcode
              jquinton@laskoproducts.com

              ^FO25,25^A0,N,25,25^BCN,100,N,N,N^FD21Hello^FS

               

              This does not create a UCC-128 barcode.

               

              code128-21Hello.png

              It seems only mode U produces a UCC-128 barcode.

               

              Is there another way to create a UCC-128 barcode in zpl? Or is alphanumerics in a UCC-128 barcode not possible in zpl?

                • Re: Alphanumerics with UCC128 barcode
                  Christal Spaeth

                  Jermaine,

                   

                  Alphanumerics are possible in UCC-128 but mode U is not required. FN1 triggered by >8 is the switch that enables UCC-128. The following test ZPL code allows you to print and scan a UCC-128 barcode with either a start code of A (>9) or a start code of B (>:) containing alphanumeric characters:

                   

                  ^XA

                   

                  ^FT111,48^A0N,28,28^FH\^FDCode 128 B^FS

                   

                  ^BY4,3,73^FT73,332^BCN,,Y,N

                  ^FD>:>821HELLO^FS

                   

                  ^FT83,230^A0N,28,28^FH\^FDCode 128 A^FS

                   

                  ^BY4,3,89^FT71,154^BCN,,Y,N

                  ^FD>9>818174037444447^FS

                   

                  ^PQ1,0,1,Y^XZ

                   

                  UCC/EAN-128 bar codes always contain a special non-data character known as function 1 (FNC 1), which follows the start character of the bar code. It enables scanners and processing software to auto-discriminate between UCC/EAN-128 and other bar code symbologies, and subsequently only process relevant data.

                  image009.png

                   

                  Christal