How to print a GS1-Datamatrix in direct-protocol, how do I add FNC1?

1.3k Views Asked by At

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.

3

There are 3 best solutions below

5
Petter Friberg On BEST ANSWER

The code to add FNC1 is

CHR$(26)+"1"

example

BARSET "DATAMATRIX",1,1,8,144,0,5
PB CHR$(26)+"1"+"010000012300001710ABC123"
0
Mikitori On

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...)

0
Mr Mispel On

This example works with Direct Protocol

BARSET "DATAMATRIX",3,1,6,50
PB CHR$(232);"91121212";CHR$(232);"31031112221724122110121212332"