LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel Port on Windows 7?

Solved!
Go to solution

Hi all,

 

I am trying to migrate some older software (LV and otherwise - all in-house written anyway) that communicates via the parallel port onto a Windows 7 (64 bit) machine.  The GPIB based programs all work just fine, but I can't find a way to talk to the parallel port.  The machine (HP Pavillion Elite) came without a parallel port, but I found a PCIe card (Startech PEX1P) that adds one.  It shows up under the Windows Device Manager, but the resource address is listed as D010 rather than the old 378, and it cant be re-configured (the folks at Startech said Windows actually assigns the address).   Any suggestions?  Anyone else try this yet?

 

Thanks,

 

Michael Tracy

Synergy Microwave

 

0 Kudos
Message 1 of 10
(9,393 Views)

It sounds like whoever wrote the program hard-coded the address. Yeah, that's always a smart idea. Have you tried looking through the code to see where it's getting used. You will have to do so anyway since you need to see if they were using VISA or the port I/O functions. If VISA was being used then you might have a chance to get it to work. If the code used the Port I/O functions, then you have a problem, since those functions have limited supported under Windows post-Vista. See here: http://digital.ni.com/public.nsf/allkb/496CD7613F331EA4862571E200633507

0 Kudos
Message 2 of 10
(9,371 Views)
The problem is actually that the address assigned by Windows 7 (D010) is larger than a Integer.  I attempted to talk to the port using MAX, but that didn't work either...
Michael

@smercurio_fc wrote:

It sounds like whoever wrote the program hard-coded the address. Yeah, that's always a smart idea. Have you tried looking through the code to see where it's getting used. You will have to do so anyway since you need to see if they were using VISA or the port I/O functions. If VISA was being used then you might have a chance to get it to work. If the code used the Port I/O functions, then you have a problem, since those functions have limited supported under Windows post-Vista. See here: http://digital.ni.com/public.nsf/allkb/496CD7613F331EA4862571E200633507


 

0 Kudos
Message 3 of 10
(9,356 Views)

@SynergyMike wrote:
The problem is actually that the address assigned by Windows 7 (D010) is larger than a Integer. 


Really? That's interesting, since D010 is an integer. It's 53,264.

0 Kudos
Message 4 of 10
(9,347 Views)

Ok, its larger than the I16 used by the built-in Out Port.vi.  🙂   I tried the AccessHW version of Out Port.vi that supports U32 (and therefore handles the correct address), but I still haven't gotten anywhere with it (I wrote a dead-simple VI based on the example given in the AccessHW docs). 

 

I did achieve success with Excel/VB programs thanks to a 64-bit version of inpout32.dll, but I still need a solution for LV as well...

 

Michael 

 

 


@smercurio_fc wrote:

 


@SynergyMike wrote:
The problem is actually that the address assigned by Windows 7 (D010) is larger than a Integer. 


Really? That's interesting, since D010 is an integer. It's 53,264.


 

0 Kudos
Message 5 of 10
(9,336 Views)

Just how old of a LabVIEW version are you using? The inport and outport functions have been polynomial with I8, I16, and I32 inputs for quite a few versions.

0 Kudos
Message 6 of 10
(9,322 Views)
Its not the data line that I need to be polymorphic, but rather the address, and in LV7.1 the only address choice is I16.  When I try wiring it to a value of D010(h), I get the coercion dot...  I have the full development version, and I used the Out Port VI on the Advanced pallet. I had also tried the AccessHW drivers (which do accept the longer address) and nothing happened (not getting any error message, but the data lines on the port do not change either. 
Neither was I able to talk to the port using MAX with a VISA resource (it found the port, but attempts to communicate only produce error messages about configuration parameters (which are all set to default values).
I only need three (output only) lines...
Michael Tracy
Synergy Microwave

@Dennis Knutson wrote:

Just how old of a LabVIEW version are you using? The inport and outport functions have been polynomial with I8, I16, and I32 inputs for quite a few versions.


 

0 Kudos
Message 7 of 10
(9,293 Views)
Even the functions in newer versions of LabVIEW with the correct representation for address lines is not guaranteed to work on your OS and 7.1 is not supported at all. The AccessHW dll would also have to be written for the OS and that's not going to happen. I'd say upgrade LabVIEW and use VISA or stick to an older OS.
0 Kudos
Message 8 of 10
(9,288 Views)
Solution
Accepted by topic author SynergyMike
I know it is not guaranteed to work, but by following actual directions, I (finally!) got the Startech PEX1P card to work!!  Instead of using Out Port.VI, I tried using VISA Write again, only this time, I grounded pins 11 and 12 per the NI document on using the Parallel Port under LabVIEW. 
Michael

@Dennis Knutson wrote:
Even the functions in newer versions of LabVIEW with the correct representation for address lines is not guaranteed to work on your OS and 7.1 is not supported at all. The AccessHW dll would also have to be written for the OS and that's not going to happen. I'd say upgrade LabVIEW and use VISA or stick to an older OS.

 

0 Kudos
Message 9 of 10
(9,280 Views)

can you read & write at Parallel port?, I have exactly the same problem same hardware with the startech card, could you share exactly the combination of software you use or can I use labview 2016 as well?

0 Kudos
Message 10 of 10
(5,080 Views)