LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Zebra ZD420 - checking for "downloaded" fonts

Solved!
Go to solution

Hi folks,

 

don't worry, this isn't a   "how do I print a barcode"   type question, I have my labels printing as required, they are a mix of static images and text and dynamic text and QR codes.

 

I'm using the Zebra drivers and simply send my file containing the ZPL code to the printer using the System Exec.vi to a shared printer (connected via USB).

 

What I would like to find a way to do is to get some data back from the printer so I can check that the correct fonts have been uploaded to the printer and that they have been assigned the correct Font identifier (^CW command). 

 

I can easily do this from the Zebra setup utilities, I open communications with the printer, send the following command:  ^XA^HWE:*.*^XZ   and get back a list of installed fonts: 

 

- DIR E:*.*
* E:OPE000.TTF 217360 W
* E:OPE001.TTF 224592 X
* E:OPENSANS-BOLD.TTF 224592
* E:OPENSANS-REGULAR.TTF 217360
* E:TT0003M_.TTF 169188

- 66054656 bytes free E: ONBOARD FLASH

 

What I'm struggling with is a way of getting the data back from the printer via LabVIEW.  I can send the ^XA^HWE:*.*^XZ  command in a ZPL file via the System Exec but nothing helpful is returned, just  " 1 file(s) copied." via the Standard Output.

 

I'm using Windows 10 and LabVIEW 2017.

 

cheers.

0 Kudos
Message 1 of 31
(4,301 Views)
Solution
Accepted by topic author RaptorUK

Here is a USB driver for direct communication with the printer via USB. This is posted as-is. This works quite reliability though there are some issues if you try communicating to multiple printers at the same time in the same application. Communicating with a single printer works quite well.

 

The DLL file should be placed in the folder c:\ProgramData\ZebraTools\Drviers. You may also need to place a copy of the lvzlib.dll file in the same folder. I don't recall where the normal location where that DLL can be found.



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 2 of 31
(4,288 Views)

Hi Mark,

 

thanks for that,  I had a quick play and managed to connect to the printer and get the required directory listing (font list).

 

👍

0 Kudos
Message 3 of 31
(4,276 Views)

Hi Mark,

 

I've written my application and it all works in the development environment . . .  but when I build it into an executable my code can no longer get the printer name,  it's sees a printer (returns a value of 1) but won't get it's friendly name.  

 

I tried building your TestZDDriver vi as an EXE and am getting the same result . .   it works as a vi in the Dev environment but not as an EXE,  any ideas ?

 

I'll keep digging but if you have a answer/suggestion it will probably save me some time 😉

 

Windows 10 and LV 2017

0 Kudos
Message 4 of 31
(4,155 Views)

Did you make sure your installer copies the ZUSB.dll to the [Public App Data]\Zebra Tools\Drivers folder? Typically the full path is "C:\ProgramData\Zebra Tools\Drivers".



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 5 of 31
(4,133 Views)

Hi Mark,

 

sorry for the delay,  last Thursday & Friday were public holidays here . . .

 

Yes, I added the DLL as part of my Installer and double checked that it was correctly "installed". 

 

My application is in use at the moment and will be for the next couple of days,  I worked around this issue for now.  If there is anything else you can think of, or any ways to find what is going wrong, I'll be able to check later in the week so no mad rush.

 

Thanks for the help. 

0 Kudos
Message 6 of 31
(4,105 Views)

Can you post a small example of how you are trying to get the printer name.



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 7 of 31
(4,090 Views)

Hi Mark,

 


@Mark_Yedinak wrote:

Can you post a small example of how you are trying to get the printer name.


yes I guess so,  as I said though it all works fine in the Dev environment but not as a built EXE.

 

The attached checks for printers,  if it finds one it looks for ZD420 in the name . . .   when it fails it does find a printer but doesn't get the name.  

 

regards,

 

 

 

0 Kudos
Message 8 of 31
(4,080 Views)

Crete a virtual folder named "resource" in your project. Add the file c:\Program Files (x86)\National Instruments\LabVIEW <VERSION>\resource\lvimptsl.dll to the virtual folder. In your application builder add this to the Always Include section.

 

Also, just to confirm you, your are using the 32 bit version of LabVIEW. I doubt very much this USB library will work in the 64 bit version.



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 9 of 31
(4,071 Views)

@Mark_Yedinak wrote:

 

Also, just to confirm you, your are using the 32 bit version of LabVIEW. I doubt very much this USB library will work in the 64 bit version.


Yup, 32 bit

 

Will be getting the printer back next week and will try the lvimptsl.dll stuff and let you know.

0 Kudos
Message 10 of 31
(4,063 Views)