Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 6501 Digital Input

Solved!
Go to solution

Hi everyone,

 

I'm using a NI USB-6501 and I'm trying to understand how to read the inputs.

I've used this card to generate outputs using the example vi Write Dig Chan, it works great.

Now I'm trying to use the Read Dig Chan example vi to read an input voltage. But it seems that by default the card reads 5V (a logical 1) as input on every pins, even though nothing is connected to them. I tried to connect the output to the input, using a relay, to see if it detects a change in the input whether we send some voltage or not but it didn't change anything. It still reads 5V no matter what.

 

Can anyone help me figure out how to be able to read an input? Has this problem already happened to someone else?

 

Thanks in advance.

 

Frederic

0 Kudos
Message 1 of 4
(5,827 Views)
Of course it will read a logic 1 with nothing connected.

I have no idea what you are doing with the relay. If you directly connect an output to an input and program the output for a logic 0, you will read a logic 0 at the input.
0 Kudos
Message 2 of 4
(5,822 Views)
Solution
Accepted by topic author fcal

If you dig through the data sheet, you will see that there is a 4.7kOhm pull up on all of the digital inputs.  So with the inputs floating you will get a high (logic 1).

 

As Dennis already stated, wire your digital output directly to your digital input.  Then whatever you set the output you will read on the input.  I don't know what you are doing with a relay.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 4
(5,819 Views)

Okay, I will try this without the relay.

Thanks for the insights.

0 Kudos
Message 4 of 4
(5,809 Views)