05-16-2013 07:34 PM
Hello all,
I've been recently asked to port a Labview file from WinXP (x86) to Win7 (x64), and one of the problems I've come across is this infamous lockdown of I/O ports in Win7. I've done lots of searching around but haven't found much that would seem to help me in my situation, so I thought I'd post and ask for your help.
Basically, yes, the parallel port is being used as a poor man's DIO in my situation; we're using the individual bits as discrete signals that can be either high or low to communicate between two computers; one is Windows, one is Unix. We used to use cviVXDwrapper.dll to do this, but that is no longer working. All I need to do is flip individual bits at the right moment, it's not banging any data through or actually adhering to any communications protocol.
I know that the easiest solution here would be to buy a cheap DIO card and call it good; at a matter of fact, I recommended that to my supervisor. But he came back saying that "all the drawings would have to be changed" and there would be "a mound of cards to be bought" and we'd have to go through all these design revision change review boards...so, if there's any way to find a software solution instead of a hardware one, it would be easier and less time consuming.
I can't give my entire .vi because of intellectual property/security concerns but I can provide a few screenshots that show just how simple the code is; we're literally just reading individual pins on the Parallel Port. Is it really that difficult to do this now with Windows 7 and Labview?
Attachment Notes:
1. to_printer_port.jpg - Here we have a simple snippet of code that, if the boolean value coming in is true, writes to bit 1 of the printer port. If that output is high, it lights up an indicator on the front panel called "FPGA Config".
2. from_printer_port.jpg - Another simple piece of code that reads a Printer Port pin and reports back in boolean whether it's high or low.
05-16-2013 09:03 PM
For anyone else searching around, I was able to find the solution!
Check out this link to the NI Developer's Website:
http://sine.ni.com/devzone/cda/epd/p/id/4213
It has an example of using VISA resources to write to the Printer Port. My guess is that to read you'd just swap out the write block for the read block (found under the Instrument IO/VISA area of the Function palette) . Also note that pins 11 and 12 of the printer port *MUST* be grounded to keep timeout errors from occurring.