LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

can I use my usb port by itself as an DO/DI?

I know usb ports supply a good deal of voltage to a lot of different devices.. but could I somehow use that power as a controlable DigOutput? or as well use it as a DigInput? Also I was curious about the voltage i/o of a ethernet card.... they use 8 lines.. and as well for what im setting up will be useing 8 line.. 4 in and 4 out, 0-5V. Anyone try to do anyhting like this before? or know the specs on ethernet cards/usb ports to even know if its possible? thanks a lot!
0 Kudos
Message 1 of 8
(3,155 Views)
I might be "theoretically" possible to do this kind of thing, but personally I'd be scared to--too great a chance of frying something expensive inside your computer. In the long run it would be cheaper and a lot easier to use an appropriate digital io card.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 8
(3,155 Views)
I second Mike's comments.

Go for the parrallel port.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 8
(3,155 Views)
Parrallel port eh? hrrrmmm.. might try that... but yea.. I dont wan to end up frying anyhting either. First Ill just try to use it for output before i try anyhting for input. Thanks!
0 Kudos
Message 4 of 8
(3,155 Views)
Having done serial and parallel port control a few times, here are some of the things that I've found:

Most serial and parallel ports send output as pulses. So if you want to "turn a line on" you have to build some hardware to latch that state (I built a simple circuit with line 0 of my parallel port as the clock input on a latch, so everytime line 0 pulsed, the values on the other lines were latched). Some parallel ports can hold line states, but not all parellel port hardware supports this. Reading input is easier.

Serial and ethernet are pulse oriented even more than parallel ports are. Since bytes are sent 1 bit at a time, more external hardware is needed to latch or read multiple lines. 100baseT ethernet uses 2 wires for input and the input is differe
ntial, most chip sets (all that I know of, but I can't speak for ALL of them) require these lines to mirror each other and can not read each of these wires seperately. The read on them is basically edge triggered based on divergent changes (pulses). Output is differential as well.

I can't speak about USB since I haven't worked with it much. But then it is a Serial Port isn't it? Should send data out in a pulse train.

Parallel port is easiest for "hardwareless" DIO. Hope this answers some of your questions.

Rob
Message 5 of 8
(3,155 Views)
Thanks, Im working more with Parallel Port right now.. still trying to firgure it all out... so far now luck.. know of a VI that would have just a simple D I/O output that would work with Parallel Port? Ive been looking around and so far no luck, the only thing I could find was Parallel exp.vi inside Access_Parallel_Port_with_VISA.llb. Thats about the closest to what I need as ive found but Ive had no luck with running it, always gives me errors about timeouts.
0 Kudos
Message 6 of 8
(3,155 Views)
Hello,

There�s good advice here from all who have posted on this thread. I�d like to second their comments on the parallel port. The parallel port is probably the easiest way to do what you�d like, but be very careful as the parallel port I/O can�t source/sink very much current, and you can burn it out quite easily.

Here are some links to example programs involving controlling the parallel port from Labview:

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B123AE0CBAF1111EE034080020E74861&p_node=DZ53015

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3DDDF56A4E034080020E74861&p_node=DZ52058

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B123AE0CBA4C111EE034080020E74861&p_node=D
Z52058&p_source=External

I hope these help out.

Ken S.
National Instruments
Message 7 of 8
(3,155 Views)
Its output voltage may drop from around 4 volts when supplying zero
current to 2 or 3 volts when supplying just a few milliamps. If
overloaded, it can be damaged in a way that it now only outputs say 2
or 3 volts when supplying zero current.

On Thu, 18 Mar 2004 17:41:21 -0600 (CST), Ken S wrote:

>The parallel port
>is probably the easiest way to do what you�d like, but be very careful
>as the parallel port I/O can�t source/sink very much current, and you
>can burn it out quite easily.
0 Kudos
Message 8 of 8
(3,155 Views)