Setting Individual Bits for the Parallel Data Port Using LabVIEW
Primary Software: LabVIEW Development Systems>>Full Development System
Primary Software Version: 6.0
Primary Software Fixed Version: N/A
Secondary Software: N/A
How do I set individual bits for the parallel data port using the In Port and Out Port VIs in LabVIEW? Also, how do I set a bit on the 8-bit register without updating the rest? I receive error 21 or error 37 when using the Serial Port Write or Serial Port Read VIs to control the parallel port on Windows NT.
Pick the address of the port you want to write to (such as
To set a bit on the 8-bit register without updating the rest, set a mask and change just the bits you are interested in changing (turning on/off). You also need to read from the register and update it with the mask and changed values. Refer to the attached Parallel VI (in the
To get the data lines working correctly, ground the BUSY and PE lines. These are pins 11 and 12, respectively. These are both handshaking lines and left unwired, these lines indicate that the printer is busy or out of paper. Grounding these inputs communicates to the parallel port that the device is ready to accept data.
Refer to KnowledgeBase 0TL70ATL (linked below) for more information about using the parallel port.
Note: This example was developed and tested by a National Instruments Applications Engineer for technical support purposes. This code is supported by National Instruments, but might not be completely tested and verified with each new revision of related products and drivers.
KnowledgeBase 0TL70ATL: Using the Parallel Port as an Input/Output Channel
Report Date: 04/27/1998
Last Updated: 06/11/2007
Document ID: 18QGBH0O