LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I read and write to a virtual LPT port?

I need bidirectional communication with a device that has an EPP port.  I used to use "inp" and "outp", but I switched from my parallel port to a "USB to EPP" converter, so my PC now has a virtual EPP port (no base IO address anymore).   I need to 1)write an address byte, 2) write a data byte,  and 3) read a data byte. It may be beyond anything CVI had in mind, perhaps something buried in the Windows SDK.
 
Any ideas?
 
Thanks - Phil
0 Kudos
Message 1 of 7
(9,100 Views)
Hello Phil,
 
if this is a real USB to EPP converter, this should be transparent to the PC. The PC should see this device as a real LPT port. For my application, I am using a USB to RS232 converter, but my PC sees this as a real serial port and I can easily use the CVI built-in RS232 Library functions for communication. If you open the Device Manager, can you see the port in the Ports (COM & LPT) section?
0 Kudos
Message 2 of 7
(9,076 Views)
No, it is not listed in the Ports section.  I see it in the USB devices section of DevMgr. 
 
It's frustruating that there isn't more USB support from CVI (or Microsoft for that matter ... which is where it should come from).  I'm tempted to download the DDK and hack a driver together, but it isn't in the schedule.
 
Thanks for the interest, any other ideas?
 
Phil
0 Kudos
Message 3 of 7
(9,059 Views)
hi pmetty:
   I have used usb--parallel port ,but have same issue.
   I have used usb-serial port ,and worked well.
   I think usb port and serial port  is samely (same protocol), but it is different between usb port and parallel port.
 
sonic
 
Sonic

Diffrent Strokes for Different Folks
0 Kudos
Message 4 of 7
(8,905 Views)

Hi Sonic,

Outside of using VISA or the ins and outs that are defined in CVI, you need to use Windows commands (from the Windows SDK) to communicate with the your ports.

There are a few examples of how to use the Windows SDK in CVI in your <CVI>\samples\sdk folder. Furthermore, we have an example that checks the status of a network printer using the SDK online at http://sine.ni.com/devzone/cda/epd/p/id/949 . While this example may not accomplish exactly what you need, it is another example of using the SDK in CVI.

Since CVI is based on ANSI C, you should be able to use most C-based examples you find to communicate with any port you choose.

Regards,

Matt M

0 Kudos
Message 5 of 7
(8,874 Views)

Does anyone know of any adapter that shows up as a Hex address??

 

Thanks.

0 Kudos
Message 6 of 7
(4,981 Views)

Hi JIV,

 

Could you explain your question? What are you referring to? Let me know.

 

Regards,

 

Perry S.

Applications Engineer
National Instruments
0 Kudos
Message 7 of 7
(4,968 Views)