LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Zebra ZD420 - checking for "downloaded" fonts

Solved!
Go to solution

@Mark_Yedinak wrote:

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, there is a good chance that you can get rid of that lvimptsl.dll altogether. Most locations where you use the GetValueByPtr VI macro are actually completely superfluous. I took a stab at following functions to remove that completely:

 

Get Port Status.vi

Zebra Get Port Status.png

 

Get Last Error.vi

Zebra Get Last Error.png

 

There are other things that could be optimized such as your parsing of the binary response using the Regular Expression node, but that is more a cosmetic issue.

 

The only thing that I saw at a quick glance that can't be easily simplified like this is the actual Get Printer Information.vi which needs a pointer to work with all the other functions. However that GetValueByPtr could easily be replaced with a direct call to the LabVIEW MoveBlock API so that your entire library won't depend on the special LabVIEW DLL anymore.

Zebra Get Printer Information.png

I would also change the Printer Data Buffer Reference throughout your VIs to be an U64 value and change the according Call Library Node parameters to be a pointer sized (unsigned) integer. Even though you only have a 32-bit DLL by now, if you ever get a 64-bit version by your developer, your VIs are already prepared to deal with that for this parameter.

 

 

Rolf Kalbermatter
My Blog
0 Kudos
Message 11 of 31
(2,156 Views)

@rolfk wrote:

@Mark_Yedinak wrote:

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, there is a good chance that you can get rid of that lvimptsl.dll altogether. Most locations where you use the GetValueByPtr VI macro are actually completely superfluous. I took a stab at following functions to remove that completely:

 

Get Port Status.vi

Zebra Get Port Status.png

 

Get Last Error.vi

Zebra Get Last Error.png

 

There are other things that could be optimized such as your parsing of the binary response using the Regular Expression node, but that is more a cosmetic issue.

 

The only thing that I saw at a quick glance that can't be easily simplified like this is the actual Get Printer Information.vi which needs a pointer to work with all the other functions. However that GetValueByPtr could easily be replaced with a direct call to the LabVIEW MoveBlock API so that your entire library won't depend on the special LabVIEW DLL anymore.

Zebra Get Printer Information.png

I would also change the Printer Data Buffer Reference throughout your VIs to be an U64 value and change the according Call Library Node parameters to be a pointer sized (unsigned) integer. Even though you only have a 32-bit DLL by now, if you ever get a 64-bit version by your developer, your VIs are already prepared to deal with that for this parameter.

 

 


Thanks for the suggestions. I will take a look at them. This library was written about 15 years ago and has been not been updated very frequently.



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 12 of 31
(2,148 Views)

@Mark_Yedinak wrote:

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.


Hi Mark,

 

finally got the printer back and had a look this morning . . .  so I added the lvimpts.dll to a virtual folder and then added it to the always include section

 

  AlwaysInclude.PNG

I rebuilt the EXE and . . .

 

ZD420-NotFound.PNGZD420-NotFound2.PNG

 

the printer isn't found by name.

 

From the Dev environment . . . 

06517cf1-9d11-4f1b-abd1-0dc9edb101d0.png

. . . the same dialogue shows the printer is found by name. 

 

 

 

 

 

 

0 Kudos
Message 13 of 31
(2,119 Views)

Are you using the same name in both the development environment and the application? For debugging purposes can you print/display the complete list of printers you are detecting when running the application? I have not experienced the issues that you are seeing and have released many applications using this driver. Also, if you are guaranteed that you will never have more than a single Zebra printer connected to the computer you can skip checking the name completely and simply connect to the one printer that is discovered. The driver only looks for Zebra printers based on the USB VID.



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 14 of 31
(2,113 Views)

@Mark_Yedinak wrote:

Are you using the same name in both the development environment and the application? For debugging purposes can you print/display the complete list of printers you are detecting when running the application? I have not experienced the issues that you are seeing and have released many applications using this driver. Also, if you are guaranteed that you will never have more than a single Zebra printer connected to the computer you can skip checking the name completely and simply connect to the one printer that is discovered. The driver only looks for Zebra printers based on the USB VID.


Hi Mark,

 

it's the same printer connected to the same PC in this case . . .  it does only find one printer, which is correct, I assumed that if it can't get the name of the printer the other functionality wouldn't work either (sending and receiving data),  but I haven't tested if that is true.

0 Kudos
Message 15 of 31
(2,109 Views)

@RaptorUK wrote:


Hi Mark,

 

it's the same printer connected to the same PC in this case . . .  it does only find one printer, which is correct, I assumed that if it can't get the name of the printer the other functionality wouldn't work either (sending and receiving data),  but I haven't tested if that is true.


I've just tested this and it seems the sending and receiving of data is not working as it should either when running as an EXE vs in the Dev environment.

0 Kudos
Message 16 of 31
(2,105 Views)
Solution
Accepted by topic author RaptorUK

@RaptorUK wrote:

@Mark_Yedinak wrote:

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.


Hi Mark,

 

finally got the printer back and had a look this morning . . .  so I added the lvimpts.dll to a virtual folder and then added it to the always include section

 

  AlwaysInclude.PNG

I rebuilt the EXE and . . .

 

ZD420-NotFound.PNGZD420-NotFound2.PNG

 

the printer isn't found by name.

 

From the Dev environment . . . 

06517cf1-9d11-4f1b-abd1-0dc9edb101d0.png

. . . the same dialogue shows the printer is found by name. 

 

 

 

 

 

 


Did you add it to a virtual folder named "resource"? Also, did you include the resource folder as a destination in the build spec?

 

Mark_Yedinak_0-1655223604419.png

Mark_Yedinak_1-1655223622834.png

 

You can also try an experiment and go to the folder where you placing the application (exe) and se if the resource folder with the lvimptsl.dll file is there. If not, try copying it there and run your application again.

 

If this doesn't work, the add some debug code to your application to output all of the results of the printer enumeration. Compare this with what you see in the development environment.



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 17 of 31
(2,093 Views)

@Mark_Yedinak wrote:

Did you add it to a virtual folder named "resource"? Also, did you include the resource folder as a destination in the build spec?

 

 


Ahhhhhh . . .  no I hadn't.  Now I have, and rebuilt the EXE and its working both on my Dev PC and my target PC. 

 

Thanks for persevering with me on this . . .

Message 18 of 31
(2,075 Views)

I think I need to look at Rolfk's suggestion so I can eliminate the need for the lvimptsl.dll file. This is a bug that NI introduced several releases ago. It has been reported but apparently NI isn't concerned about fixing it. I don't recall which version of LabVIEW broke this but at one point I never had to include the lvimptsl file in the build spec. Then they broke it and obviously given your experience it has not been resolved.



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 19 of 31
(2,066 Views)

One of my clients has several Zebra LP 2844-Z printers that I installed a few years ago along with our Labview control software for their test rigs. I have recently modified the Labview code to generate a QR code on the labels in addtion to other info which works fine. The original driver was created using the visa driver wizard for win 7 without any issues.

 

However they have now asked for the operating system to be changed to Windows 10 and that is where I am having serious problems. I have read quite a few posts on the forum regarding this migration and the issues it can create due to the complex nature of needing any drivers to be signed by some authority or other.

 

I was wondering if a Labview driver had been created for the Zebra LP 2844 that would work under windows 10 or some method to use the standard printer driver that zebra label designer  installs in the windows 10 available system printers?

Labview Version 8.5
Labview Version 8.6
Labview Version 2014
0 Kudos
Message 20 of 31
(1,463 Views)