From 12:00 AM CDT Sunday, October 17 - 11:30 AM CDT Sunday, October 17, ni.com will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Printer Status

I am using a FILE* rep=fopen("LPT1", "wt"); fprintf(rep, "String"); to write
line information to a line printer from my operator machine interface. I
am in a Windows NT environment. Does anyone know how to get the printer
status so I can check on whether the printer is "ON" prior to writing to
it? I have tried a small routine that I have used in the past if (_inp(0x379&0x80))
to check to see if the printer is busy but with Windows NT I get a privilege
error. Thanks in advance for your support.
Best Regards,
Sandy Cook
0 Kudos
Message 1 of 2
(2,335 Views)
Sandy,

In the event you have not yet resolved your issue of accessing the printer through the parallel port, you might want to check the NI KnowledgeBase at http://www.ni.com/public, and search on "+printer +status +nt". One of the documents that is returned talks about setting individual bits for the parallel data port using LabVIEW, but if you view the document, it has an attachment that contains information on how you can make direct access to memory on Windows NT with LabWindows CVI. The KnowledgeBase document ID you should be viewing is 18QGBH0O. If you are not able to resolve your problem, I would recommend that you post your question to the LabWindows-CVI group for further assistance, or you can contact an NI support engineer at http://www.ni.com/ask.

Regards,

Wilbur Shen
Web Support and Operations
National Instruments
0 Kudos
Message 2 of 2
(2,335 Views)