1

I need to send a GS1-Datamatrix (value of code is dynamic) to a thermal printer (intermec) via serial port using direct protocol. The GS1 DataMatrix is a standard Data Matrix, but it should start with a FNC1 (Function Code One).

The GS1 DataMatrix is formed by adding FNC1 codeword in the first position of Data Matrix ECC 200 version.

Example of label with standard Data Matrix:

<xpml><page quantity='0' pitch='110.1 mm'></xpml>'Seagull:2.1:DP
INPUT OFF
VERBOFF
INPUT ON
SYSVAR(48) = 0
ERROR 15,"FONT NOT FOUND"
ERROR 18,"DISK FULL"
ERROR 26,"PARAMETER TOO LARGE"
ERROR 27,"PARAMETER TOO SMALL"
ERROR 37,"CUTTER DEVICE NOT FOUND"
ERROR 1003,"FIELD OUT OF LABEL"
SYSVAR(35)=0
OPEN "tmp:setup.sys" FOR OUTPUT AS #1
PRINT#1,"Printing,Media,Print Area,Media Margin (X),0"
PRINT#1,"Printing,Media,Print Method,No Ribbon (DT)"
PRINT#1,"Printing,Media,Media Type,Continuous Var Len"
PRINT#1,"Printing,Media,Start Adjust,0"
PRINT#1,"Printing,Media,Stop Adjust,240"
PRINT#1,"Printing,Media,Print Area,Media Width,779"
PRINT#1,"Printing,Media,Print Area,Media Length,881"
PRINT#1,"Printing,Print Quality,Darkness,75"
PRINT#1,"Printing,Print Quality,Print Speed,100"
PRINT#1,"Printing,Media,Media Calibration Mode,Fast"
PRINT#1,"Printing,Media,Length (Slow Mode),0"
PRINT#1,"Printing,Media,Clip Default,On"
CLOSE #1
SETUP "tmp:setup.sys"
KILL "tmp:setup.sys"
LTS& OFF
<xpml></page></xpml><xpml><page quantity='1' pitch='110.1 mm'></xpml>CLL
OPTIMIZE "BATCH" ON
PP318,533:AN7
BARSET "DATAMATRIX",1,1,8,144,0,5
PB "010000012300001710ABC123"
PP150,389:NASC 8
FT "Andale Mono",12,0,99
PT "010000012300001710ABC123"
LAYOUT RUN ""
PF
PRINT KEY OFF
<xpml></page></xpml><xpml><end/></xpml>

How can I add FNC1 to PB "010000012300001710ABC123"?

I have tried:

  1. Adding CHR$(128); as used with EAN-128 code when printing GS1-128, see Programmer's Reference Manual Intermec Direct Protocol v8.60.

  2. Using Bartender-ultralite to create the GS1-Datamatrix and then printing to file using the direct protocol driver. This however creates an image in file, hence I cannot dynamically change the code.

Terry Burton
  • 2,801
  • 1
  • 29
  • 41
Petter Friberg
  • 21,252
  • 9
  • 60
  • 109

2 Answers2

0

I don't know Intermec, but for most of the printers I've seen, the people using them for something equivalent were doing this: - Create a mask with NiceLabel software (not sure if mandatory, maybe yours is doing the same) - This mask contains a variable used for the serial code you may want to change before each print - You shoudld have a command in the protocol to set this variable when needed

Then in the variable you just need to format as expected on your side, with the correct FNC1 separator (I don't know which one it is for Intermec, I heard it may depend on the printer...)

Mikitori
  • 589
  • 9
  • 21
0

The code to add FNC1 is

CHR$(26)+"1"

example

BARSET "DATAMATRIX",1,1,8,144,0,5
PB CHR$(26)+"1"+"010000012300001710ABC123"
Petter Friberg
  • 21,252
  • 9
  • 60
  • 109
  • But why at the beginning? FNC1 is an indicator of "end of sequence", so most of the time in the middle of a sequence. – Sandburg Jun 08 '23 at 14:28
  • @Sandburg because that's the GS-1 Datamatrix specification see question _"The GS1 DataMatrix is formed by adding FNC1 codeword in the first position of Data Matrix ECC 200 version."_ – Petter Friberg Jun 09 '23 at 12:23
  • Understood. Also, I get the info that the FNC1 code is `CHR$(128)` (maybe just in my case, EAN-128). And that the concatenation is done by `;` not by `+` => `PB "€0371";CHR$(128);"0204"` ... wait, is my "€" the `CHR$(26)` you mentioned? – Sandburg Jun 19 '23 at 10:11
  • `CHR$(128)` is used for GS1-128 (EAN-128) code, however with Datamatrix I needed to use `CHR$(26)+"1"` to make it work – Petter Friberg Jun 19 '23 at 11:01
  • Extra documentation: https://support.honeywellaidc.com/s/article/How-to-print-FNC1-in-DataMatrix-or-EAN128-barcode-using-Direct-Protocol – Sandburg Jun 19 '23 at 14:43