LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview 7 - How do I tell if the default printer is connected?

I have an HP USB printer as the default. It works fine when I print to it in LabVIEW. But, if I disconnect it, no errors occur. So I can't tell that my report did not print!
0 Kudos
Message 1 of 3
(3,090 Views)
Hello.
You should get an error message that says either the command failed or that the vi failed to get printer information (depending on whether you are using a Standard Report or a Word/Excel Report) when the print vi runs. Try creating a test vi that opens a new report, adds some characters, prints, and closes. If there are no printers connected you should get an error message.

If you have another printer connected to your computer it is possible the default is being reset and it is sent to that printer.

Also, make sure you are using error handling to ensure that you catch the error that comes out of the print vi.

Colin Christofferson
Applications Engineer
Colin Christofferson
Community Web Marketing
Blog
0 Kudos
Message 2 of 3
(3,090 Views)
Thank-you for your answer. Still no joy. This time, instead of using the simple report, I used New Report, Append Report Text, Print Report, Dispose Report, Simple Error Handler. I made a report that nicely prints, "Hello World" to my HP PSC 1200 USB printer. Then, I unplug it from the USB port and run the VI again. No error, no nothing. When I check the printer under the control panel, it is OFFLINE, and my Hello World report is there on the print queue. (Same results as with simple report + simple error handler.) How can I check the status of a printer to see if it is OFFLINE or NOT???

Thanks again.

road dog.
0 Kudos
Message 3 of 3
(3,090 Views)