LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV does not print barcode fonts

Solved!
Go to solution

Follow up to my own questions:

 

  1. I realized that the Ethernet port is an option, so our printer may not have the Ethernet port. Then I wil have to use USB port.
  2. Because the printer is shared, I'm not supposed to change anything to the printer, but I can do whatever to my computer.

 

Guangde

0 Kudos
Message 21 of 30
(1,814 Views)

@guangdew1 wrote:

Follow up to my own questions:

 

  1. I realized that the Ethernet port is an option, so our printer may not have the Ethernet port. Then I wil have to use USB port.
  2. Because the printer is shared, I'm not supposed to change anything to the printer, but I can do whatever to my computer.

 

Guangde




See this thread regarding communicating with a Zebra printer from LabVIEW using USB.

 

Regarding your other question one of the prefered and most efficient methods for printing labels on a Zebra printer would be to define the label format in ZPL itself. In your case I would recommend using a stored format and then simply send teh variable fields to the printer. This behavior is explained in the ZPL manual which you can get from the Zebra web site. (It is too large to attach here). If you were to use VISA for your communication you could easily switch between a networked connection or a USB connection.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 22 of 30
(1,804 Views)

Hi Mark,

 

Thank you for the help. Looks it's a complicated process to print through USB port (or other ports). I don't know how much time I'm going to have working on this project, as the first step, I'm going to install the printer driver to my computer so at least we can copy and paste the serial number then print it. After that, if I still have time, I'll see to print it from my program.

 

 

0 Kudos
Message 23 of 30
(1,791 Views)

Serial, parallel and TCP/IP are all very easy to do with the printer. The most difficult one is the USB and I provided a complete list of instructions for doing that. If you try to print through the Windows driver the best method is to configure it to be a raw text port. Create the ZPL as I suggested earlier and than just send the ZPL to the printer. If you simply try to print through the driver without it in raw text mode you will see the ZPL printed on the label, not the label itself.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 24 of 30
(1,772 Views)

Hi Mark,

 

Thanks for the help. We have a few Zebra label printers, ZM400, Z4M Plus and Z4M. The only one ready for me right now is the Z4M which has only parallel interface. Do you think the Z4M will work with 32 bit Window 7? Also, for ZM400, if I use Ethernet connection, can I use straight cable to connect from my computer to the printer?

 

 

0 Kudos
Message 25 of 30
(1,768 Views)

@guangdew1 wrote:

Hi Mark,

 

Thanks for the help. We have a few Zebra label printers, ZM400, Z4M Plus and Z4M. The only one ready for me right now is the Z4M which has only parallel interface. Do you think the Z4M will work with 32 bit Window 7? Also, for ZM400, if I use Ethernet connection, can I use straight cable to connect from my computer to the printer?

 

 


The parallel port will work fine on a Win 7 machine. I have seen some TCP issues with LabVIEW and Win 7. These are not related to Zebra printers but are direct issues with Win 7 and LabVIEW. With the latest release of the 2011 service pack I am not sure if the TCP issues were addressed or not.

 

As for the cabling, the NIC on the printers or our external printer server do not auto negotiate the direction and would therefore require a cross over cable. However many of the newer PCs can take care of this for you. You would have to try. If you can't communicate with the printer you will need a cross over cable.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 26 of 30
(1,748 Views)

Hi, Mark, 

 

Hope you are still out there. 

 

^XA
^LH0,0
^PR4
^LT0
^BY2,3,10
^FO140,20^BCN,50,Y,Y^FD>:1234^FS
^PQ1
^XZ

 

I have been using this code since you posted it. Now I am trying to make the actual barcode text above the barcode print larger. You mentioned the ^BY comman control the sizes of both barcode and its text. I tried, but it did not give me what I wanted. I only want the text to be bigger without changing the barcode. Can you help? Thanks much. 

0 Kudos
Message 27 of 30
(1,641 Views)

Here is a modified version of the ZPL:

 

^XA
^LH0,0
^PR4
^LT0
^BY2,3,10
^FO140,20^A0,40,25^BCN,50,Y,N^FD>:1234^FS
^PQ1
^XZ

 

It uses the ^A command to change the font and the size of the characters. The command is ^Afo,h,w, where f is the font selection (A-Z and 0-9), o is the orientation (N is normal, R is rotated 90 degrees, I is rotated 180 degrees and B is rotated 270 degrees), h and w are the height and width of the characters in dots.

 

The one issue you have though is that the text should be under the bar code and it will be left justified.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 28 of 30
(1,621 Views)

I am having trouble with this desktop printer 

ZTC GX420t.

 

Called the technical support, waited like 5 min, no one answered. I figured it is probably better choice to come here and find you. 

 

Here is the issue. Everytime this printer prints, it skips a bounch of labels first, then prints. All the settings seem right. Non-continuous roll media, WEB sensor, GAP/NOTCH media type, Print Width 609, MAX LENGTH 39.01in. Only the 'LABEL Length' is not correct. It is 1394 while the real size is 94. 

 

There is no button to configure this printer. So connect to it by IP, but I cannot find a 'Label Length' setting. 

 

Then I tried to send this command to set up the 'label length' programmatically. 

^XA
^LL94
^LH0,0
^PR4
^LT0
^BY3,3,10
^FO30,15^A0,20,36^FD%s^FS
^FO30,65^A0,20,36^FD%s^FS
^FO250,65^A0,20,36^FD%s^FS
^PQ1^XZ

 

Still no luck. Help plz. 

0 Kudos
Message 29 of 30
(1,539 Views)

Mark,

 

Never mind. I figured out how to run the manual calibration. The printer resets its label length. It works now. need to go through the entire manual book. 

0 Kudos
Message 30 of 30
(1,432 Views)