06-10-2022 07:31 AM - edited 06-10-2022 07:39 AM
@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
Get Last Error.vi
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.
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.
06-10-2022 09:51 AM
@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
Get Last Error.vi
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.
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.
06-14-2022 06:02 AM - edited 06-14-2022 06:03 AM
@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
I rebuilt the EXE and . . .
the printer isn't found by name.
From the Dev environment . . .
. . . the same dialogue shows the printer is found by name.
06-14-2022 06:43 AM
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.
06-14-2022 09:10 AM
@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.
06-14-2022 09:51 AM
@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.
06-14-2022 11:20 AM - edited 06-14-2022 11:23 AM
@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
I rebuilt the EXE and . . .
the printer isn't found by name.
From the Dev environment . . .
. . . 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?
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.
06-15-2022 03:56 AM
@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 . . .
06-15-2022 09:17 AM
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.
12-12-2022 01:53 PM
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?