LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reading from a parallel port

Hi all,

I have bulit a photo-senors to read the orgin of a motor, when the senors isn't at the orgin it gives a voltage of 5 and at the orgin it is 0 volts. This information travels throught the parallel port and i want to read it on labview (reading from port 2). The code below is an example that i tried, i was trying to read from port 2.

   

0 Kudos
Message 1 of 21
(4,352 Views)

What is your issue? Also, what do you mean by reading from "port 2"? Have you taken a look at the parallel port read/write VI that ships with LabVIEW? Open the Example Finder (Help -> Find Examples) and search for LabVIEW.

 

Also, have you verified that you parallel port is 5V tolerant? Many computer nowadays have 3V parallel ports. 

0 Kudos
Message 2 of 21
(4,345 Views)
My issue is to read the voltages from port 2. I don't know how to check if the parallel port is 5V tolerant. However, the computer i am using is an old computer.
0 Kudos
Message 3 of 21
(4,340 Views)
You should check in device manager to see what the address of your second parallel port is. what you have now is the typical addrss for the first printer port. Also make sure the port is configured correctly. If I remember, there are directions with the shipping example (Search for 'Parallel').
Message Edited by Dennis Knutson on 03-22-2009 11:49 AM
0 Kudos
Message 4 of 21
(4,331 Views)
The address that i am using is the typical addrss for the first printer port.
0 Kudos
Message 5 of 21
(4,317 Views)
Then your question makes no sense since you said a couple of time that you want to read from port 2. Do you actually have 2 ports or should we just subtract 1 from everything that you say?Smiley Tongue
0 Kudos
Message 6 of 21
(4,314 Views)
sorry i mean pin 2.
0 Kudos
Message 7 of 21
(4,310 Views)
Okay, so what is the problem? Have you tried the example that comes with LabVIEW (Parallel Port Write and Read Loop) and have you configured the parallel port in the BIOS according to the instructions in the example?
0 Kudos
Message 8 of 21
(4,289 Views)

Are you perhaps asking how to specifically get the value of bit 2? If so, then use Index Array to get the value from your Boolean array.

 

Have you gone through the LabVIEW tutorials? To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.

0 Kudos
Message 9 of 21
(4,273 Views)

Hi Ak Star,

 Did u configured your parallel port as SPP(Standard parallel port) . If u connected your input to the pin2 then u need to read the staus of data bit 0.  what is the output u getting after u run your programme,Its always showing high\low? asking how to specifically get the value of bit 0? If so, then use Index Array to get the value from your Boolean array(as smercurio_fc said).

 

 smercurio_fc wrote

Also, have you verified that you parallel port is 5V tolerant? Many computer nowadays have 3V parallel ports. 

 

I like to know, what is 5V tolerant and 3V tolerant. do u mentioned TTL as 5V and CMOS as 3V or something else, please forward the infos or related links.

 

 

 

 

Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 10 of 21
(4,251 Views)