Handheld 2D barcode scanner reading a Data Matrix symbol at a receiving bench

GS1 DataMatrix Scanner Setup: FNC1, Group Separators and Missing Lot Data

If a barcode scanner beeps but your warehouse or production system stores the lot number and expiry date in one field, start with the decoded data—not the optics. A GS1 DataMatrix can carry a product identifier, a date and a lot or serial number in one scan. The scanner, connection and application must agree on how those fields are identified and separated. This guide shows how to find the point where that agreement breaks.

What FNC1 does—and what your application receives

GS1 DataMatrix uses a leading Function 1 Symbol Character (FNC1) to indicate the GS1 data format. That leading marker is not an ordinary character at the beginning of your product number. A reader configured to transmit the AIM symbology identifier may report ]d2 to identify GS1 DataMatrix. The identifier is reader metadata; it is not part of the GTIN.

Within the symbol, a separator marks the boundary after an element string that is not of predefined length when another element follows. A decoded separator is represented as the Group Separator control character, decimal 29 or hexadecimal 1D, in a standards-based output. A reader or application can be configured to represent that separator differently. Check the actual output instead of assuming a blank-looking character is missing. See the GS1 General Specifications for the complete rules and the predefined-length table.

Read a sample payload from left to right

Consider an illustrative label whose human-readable text is (01)09506000134352(10)LOT7(17)271130. The parentheses show the Application Identifiers in the printed text; they normally are not literal characters in the GS1 barcode data. With a symbology identifier enabled, a diagnostic display might show:

]d2010950600013435210LOT7<GS>17271130
  • 01: The next 14 digits identify the trade item. Preserve them as text so the leading zero is not lost.
  • 10: The batch or lot value is variable in length. Here it is LOT7. A separator is needed before the following element.
  • 17: The expiration date uses YYMMDD. The example value 271130 is 30 November 2027.

The text <GS> above is a visible notation for a control character, not five literal keystrokes. If the label instead orders the fields as GTIN, expiry, then lot, the lot can be last and no trailing separator is normally needed. Test both orders. An implementation that works only when the variable-length field is last can pass a demo and still fail on incoming supplier labels.

Find where the data changes

  1. Check a known-good label. Start with a sample with a known payload and a variable-length field followed by another field. Keep a plain Data Matrix sample for comparison. Enabling Data Matrix decoding does not prove that the label was encoded as GS1 DataMatrix.
  2. Read as close to the scanner as you can. Use a vendor diagnostic tool or an interface that shows raw bytes. Capture whether the symbology ID is present and whether a 1D byte appears at the expected boundary. A text editor or browser field may not display a control character.
  3. Compare at the input boundary. Capture what the actual WMS, ERP or manufacturing application receives before it interprets the fields. If the scanner sends the separator but the app does not receive it, inspect keyboard emulation, browser input handling or any middleware in between.
  4. Validate storage. Check the saved record, not just the entry screen. Confirm leading zeros survive, lot and serial values are not swapped, dates are interpreted consistently and rejected records cannot appear as completed receipts.

Choose an interface the application can reliably process

USB HID keyboard mode can be a convenient retrofit, but an application may handle a control key differently from a normal printable character. A documented scanner-side replacement token can work when the host expects it and it cannot be mistaken for valid data. Do not silently substitute a comma, pipe or other character that a legitimate field may contain; either use a proven non-colliding representation or define an escaping rule understood by both sides.

USB virtual COM, serial or a vendor SDK can be better when the host needs deterministic framing or direct access to control characters. Confirm the exact model, firmware, driver and output mode, then run the same label set on the actual operating system and application. The scanner interface guide compares these connection options. Also distinguish the separator inside one barcode from a suffix such as Enter that marks the end of a scan. Adding Enter will not restore a lost field boundary.

Do not parse a lot number by looking for the next two digits

A valid lot can contain digits that look like an Application Identifier. If a parser searches for the next occurrence of 17 inside a variable-length lot, it may truncate the lot or invent an expiry date. For example, if the lot itself contains 17, that sequence is not a field boundary. Parse using the GS1 syntax and separator rules, not a guess based on familiar digits. Treat the GTIN as a string, validate its check digit where required and apply the business rules for which fields must be present.

Keep a distinct invalid-data outcome. A valid optical decode with a missing required expiry date should not be reported as a no-read, and it should not update inventory silently. Tell the operator what needs correcting: wrong label type, malformed element string, unknown item, missing field or duplicate serial. Record the raw sample in a controlled diagnostic environment where appropriate; production logging should follow your own data-handling rules.

Acceptance checklist before buying or rolling out

  • Compare two or more supplier layouts, including expiry before lot and expiry after lot. Include short and long lot values with digits that resemble AIs.
  • Include a GTIN with a leading zero, a missing separator, a wrong check digit, an unexpected AI and a plain non-GS1 Data Matrix.
  • Confirm that a scan with only a product identifier is accepted or rejected according to the workflow, not according to a convenient parser default.
  • Re-run the tests after disconnecting and reconnecting, replacing the scanner, and loading a configuration profile on a fresh unit.
  • Record the scanner model, firmware, configured interface, symbology identifier behavior, separator representation and host software version. Document expected outcomes for both positive and negative tests.

Frequently asked questions

Why do I see a square, a blank or no character between fields?

Many text views hide or replace ASCII control characters. Check the received bytes or use a diagnostic view that escapes them. If the byte was removed or replaced, compare scanner output with application input before changing the label.

Do I need a different scanner if a lot and date are joined?

Not necessarily. If the current reader decodes GS1 DataMatrix and can preserve a separator in an interface your host understands, configuration or application changes may be enough. Replace hardware only if testing shows a capability gap.

What should I send a scanner supplier?

Share representative labels, their expected data fields, the target interface, the host application, scan distance, minimum symbol size and a sample of the required output. Explore TechBarcode scan engines for embedded designs or contact TechBarcode to discuss a sample test.

Back to blog