LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to generate and print 20x20 datamatrix barcode using labview?

I send ESCAPE codes through a serial or USB port to communicate with CITIZEN printers. I guess this is also possible with ZEBRA printers.

0 Kudos
Message 11 of 17
(3,994 Views)

You can send ZPL commands to the printer.  My printer is networked, so I found it easier to save the text to a file and then use MSDOS command to send to printer. If your printer is connected by serial, you can probably send direct by a VISA command.  The codes for the ZPL are explained in

https://www.zebra.com/content/dam/zebra/manuals/en-us/software/zpl-zbi2-pm-en.pdf

 

The attached snippet shows a simple datamatrix barcode.  You can add more barcodes or text to the same label, start each one with ^XA and end with ^XZ.  Use the  ^FO to locate each one.

 

 

maat
LV2019
0 Kudos
Message 12 of 17
(3,946 Views)

Would you have any example vi for this? This is exactly what I'm trying to accomplish.  Zebra GK420d printer with using Bartender. Thanks.

0 Kudos
Message 13 of 17
(3,890 Views)

Hi,

 

You can easily generate DataMatrix code into PNG file with Zint Barcode Generator using command line. For example: C:\...\zimp.exe -o YOUROUTPUTFILEPATH -b 71 --square -d YOURCODE creates PNG that you can use in LabVIEW (parameter -h shows complete options)

 

Download it here:

http://sourceforge.net/projects/zint/?source=navbar

 

 

Hope this helps,

Marek.

 

Message 14 of 17
(3,786 Views)

Thanks Marek.  That Zint is slick, i hadn't run across it.

maat
LV2019
0 Kudos
Message 15 of 17
(3,756 Views)

@MarekH wrote:

Hi,

 

You can easily generate DataMatrix code into PNG file with Zint Barcode Generator using command line. For example: C:\...\zimp.exe -o YOUROUTPUTFILEPATH -b 71 --square -d YOURCODE creates PNG that you can use in LabVIEW (parameter -h shows complete options)

 


Hi Marekh, 

 

Thanks for your post. I tried to run as you said, I don't find problem in system cmd prompt it generates png very nicely.

 

But when do the same thing in LabVIEW,  end up an error from system exec function as "Memory Full"

 

Any thoughts?

---
Silver_Shaper | CLD
0 Kudos
Message 16 of 17
(3,729 Views)

Hi Sasi,

 

maybe there's a problem with your access rights to Program Files (x86)\Zint directory, which is destination where image is saved if no -o parameter is specified. Or there maybe problem with directory names (if spaces are present in derectory name, you should use quotation marks in file path ")

 

Do you have this "Memory full" problem when you use just System Exec.vi, like in the picture ?

If not you can upload the VI so that we can see what the code looks like.

 

Regards,

Marek

0 Kudos
Message 17 of 17
(3,704 Views)