LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Send a file to the printer!

Hello,

is it possible to send a file, that is generated with the
printer-driver, to a network-printer? This should be done with LabVIEW
6i

Jens
0 Kudos
Message 1 of 3
(3,020 Views)
Yes and no.

The printer has to be of the type that allows this (I don't know the exact requirement but some printers allow it and others don't).

Set up your computer so the network printer is "mapped" to printer port like "LPT1" or "LPT2" (If I recall this requires you to answer yes to the "Do you print from MS-DOS applications?" during the "Add a Printer" wizard).

Then, you will need to use the "Shell Exec.vi" and do a "COPY /B Filename.bin LPT1", given that "Filename.bin" is the file you created with the print driver and "LPT1" is the port you mapped your printer to.

Good luck.
0 Kudos
Message 2 of 3
(3,020 Views)
x@no.email (VI Guy) wrote in <5065000000050000007CAB0000-1031838699000
@exchange.ni.com>:

>Yes and no.
>
>The printer has to be of the type that allows this (I don't know the
>exact requirement but some printers allow it and others don't).
>
>Set up your computer so the network printer is "mapped" to printer
>port like "LPT1" or "LPT2" (If I recall this requires you to answer
>yes to the "Do you print from MS-DOS applications?" during the "Add a
>Printer" wizard).
>
>Then, you will need to use the "Shell Exec.vi" and do a "COPY /B
>Filename.bin LPT1", given that "Filename.bin" is the file you created
>with the print driver and "LPT1" is the port you mapped your printer
>to.
>


Alternatively if it's just a plain old text printer, you can use the serial
vi's
to send the text directly to a line printer using COM10. Note that you
will have to include a line in your labview.ini file (and in the ini file
with your built application) that allows you to access com10. The line is
something like:

"serialDevices=com1;com2;com3"

but a search on using the line printer on the NI website will reveal the
correct key and entry.

--

Alexander C. Le Dain, PhD
ICON Technologies Pty Ltd
http://www.icon-tech.com.au

******************************************************************
* The LabVIEW FAQ http://www.icon-tech.com.au/thelabviewfaq.html *
******************************************************************
0 Kudos
Message 3 of 3
(3,020 Views)