01-24-2015 09:50 AM
Hello list,
I've got an application that is used on the shop floor that tests a product and then prints a certification sheet at the end of the test that ships with the product. They only run this test cell about once a month and invariably there is something wrong with the printer...no paper, dried up ink cartridge, etc.
The operator has no keyboard or mouse and the Labview application starts from the Startup folder.
I would like Labview command the printer to print a test page when when the test application starts. I couldn't find anything in the Windows API or on the Labview pallets that would do that.
Any ideas would be helpful.
Using Windows 7 & LV11
Thanks,
Mike
Solved! Go to Solution.
01-24-2015 10:15 AM
A couple of possible options:
01-24-2015 11:54 AM
You already have an application that can run this? Is it possible to use the System Exec vi to call that application?
01-24-2015 02:35 PM
Thanks to both of you. I was looking for an easy way to do this. I think alll they want is a way to make sure the printer has paper & ink.
The app is on the shop floor computer where there is no LV Development System, and the development system on my desk doesn't have the printer drivers, and HP won't let them install without the printer connected.
Looks like I'll have to build my own Print Test Page and use my app to send it on startup.
Thanks again,
Mike
01-24-2015 04:36 PM
Maybe the easiest way is to create a test document with WordPad (rtf) and print the file via command line call (System Exec).
This will print document.rtf to the default printer: write /p document.rtf
01-24-2015 05:10 PM
I found something else here:Rundll32 printui.dll,PrintUIEnt
I don't have a real printer right now connected on my PC, but this command line prints the default test page on Adobe PDF
rundll32 printui.dll,PrintUIEntry /k /n"Adobe PDF"
You just need to replace the printer name after the /n parameter and call it via System Exec
01-26-2015 07:21 AM
Chembo,
Thanks!
I think this is what I was looking for. I'll try it and let you now.
Mike