Support for FNC Characters for GS1 Barcodes

Label designer allows you to have certain special characters in font-based Gs1 Linear and Datamatrix barcodes. You can select a value for font type in label designer while editing a barcode.

GS1 font-based barcode functionality allows you to:

  1. Choose the type of barcode field you need (Code 128, A B or C).
  2. Decide on the fields that make up the barcode.
  3. Bring together the fields in an expression that places the FNC characters as required.

Functions

The following functions can be used for this:

gs1_li_code - Accepts a keyword and generates a ZPL instruction that results in this special character on the label. This should be used for GS1 linear barcodes. Supported keywords are: FNC1, FNC2, FNC3, FNC4, STARTA, STARTB, STARTC, CODEA, CODEB and CODEC. Note - Every keyword is NOT applicable to every subset (A, B and C), so the users must know what kind of combinations they are using.

Sample expression to generate an FNC1 character: gs1_li_code('FNC1')

gs1_dm_code - This is the GS1 - Datamatrix equivalent of gs1_li_code. Supported keywords are 'FNC1', 'FNC2', 'FNC3'.

Sample use: gs1_dm_code('FNC1')

chr - This is a basic function. Given an integer value, it returns the corresponding ASCII code. You should ensure that sensible data is passed in based on the column mapping used.

Sample use: chr(29)

gs - Helper function which returns the group separator character (ASCII code 29). This is merely for convenience but it can also be generated using chr (as in the example above).

Commonly known issues/recommendations

  1. Sometimes all that is required is to use Subset A, B or C.
  2. Missing quotes or double quotes, extra quotes, using `instead of. Because of the flexibility and power of expressions we have had to adopt different syntax to support different things.

Example:

In the following Expressions example, pay close attention to the way single quotes and double quotes are used. The 00 is an example of an Application Identifier located at a strategic place (if it is to be used).

gs1_li_code('FNC1') + "00" + "\~container.container_nbr"

Application Identifier

Barcode Construction Example

Note: there are many possible GS1 configurations. This is one example. Please refer to the GS1 Manual for the configuration you need and determine what your mappings should be:

[Start C Character] + [FNC1 Character] + Barcode Prefix + [Code A Character] + Merchant ID + [Code C Character] + Article ID(without Merchant ID + [Symbol Check Character] + [Sop Character]

Article ID: XYZ028373401001860208

This comes back to us as full string but can be broken down by the following components:

  • Merchant ID: XYZ
  • Consignment ID: 0283734
  • Article count: 01
  • Product Code: 00186
  • Service Code: 02
  • Paid Postage Indicator: 0
  • Check Digit: 8

Barcode Prefix = The items listed below in between the Function 1 Symbol & Code A character. This is a fixed value that will always be the same for this example. In this example the value is "0523349852737927562".

Barcode Prefix = [Application Identifier][Indicator][Company Prefix][Item Reference][Check Digit][Application Identifer]

Merchant ID = This is a fixed 3 digit value, in this example it is XYZ.

Article ID (without Merchant ID) = The Article ID defined above needs to have the first three characters and the merchant ID stripped because there needs to be a Code C Character in between the Merchant ID and the other components of the Article ID.

Article ID = [Consignment ID][Article count][Product Code][Service Code][Paid Postage Indicator][Check Digit]

You would then build the barcode like the following example:

[Start C Character] + [FNC1 Character] + 0199312650999998911 + [Code A Character] + XYZ + [Code C Character] + Bytes 4-27 of the LPN Tracking number + [Symbol Check Character] + [Stop Character].

gs1_li_code (GS1 Linear barcode) – This takes in a keyword and returns a special ZPL instruction that results in this character on the label. This should be used for GS1 linear barcodes. Supported keywords are: FNC1, FNC2, FNC3, FNC4, STARTA, STARTB, STARTC, CODEA, CODEB and CODEC.

Note: every keyword is NOT applicable to every subset (A, B and C).

Sample use: gs1_li_code('FNC1')

gs1_dm_code(GS1 Datamatrix barcode) - This is the Datamatrix equivalent of gs1_li_code. Supported keywords are 'FNC1', 'FNC2', 'FNC3'.

Sample use: gs1_dm_code('FNC1')

chr - This is a basic function. Given an integer value, it returns the corresponding ascii code. You should ensure junk values are not passed in gs. This is a helper function which returns the group separator character (ASCII code 29).

Australian Post Example

The expressions are:

DataMatrix

"" if
        "\~carrier_lpn.tracking_nbr"=="" else gs1_dm_code('FNC1') + "0523349852737927562XYZ" +
        gs1_dm_code('FNC1') + "\~carrier_lpn.tracking_nbr"[3:27]

This expression and the dimension configurations together generate the ZPL instructions:

^FO640,100

^BXN,7,200,,,,_,1

^FD_10523349852737927562XYZ
        _1028373401001860208^FS

Linear Barcode (For barcode type 128)

"" if
        "\~carrier_lpn.tracking_nbr"=="" else gs1_li_code('STARTC') + gs1_li_code('FNC1') + "0523349852737927562" + gs1_li_code('CODEA') + "XYZ"
        + gs1_li_code('CODEC') + "\~carrier_lpn.tracking_nbr"[3:27]

This expression and the dimension configurations together produce the ZPL code:

^FO51,550

^BY3^BCN,175,N,N

^FD>;>80523349852737927562 >7XYZ>5028373401001860208^FS

Caution:

For Datamatrix the character _ (underscore) has a special meaning. This character specifies a ZPL instruction for the FNC1. If the data to be barcoded has _ already, then we may need to make some minor changes.

[Start C Character] + [FNC1 Character] + Barcode Prefix + [Code A Character] + Merchant ID + [Code C Character] + Article ID(without Merchant ID + [Symbol Check Character] + [Sop Character]