LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview with myDAQ: how do digital inputs behave?

hi there,

 

I am using Labview 2015 with NI myDAQ and I just watched this video: https://decibel.ni.com/content/docs/DOC-11686

The video claims that the digital inputs must be inverted and when they are inverted, they will all be LOW as default and switch to HIGH when connected to GND.

 

It set everything up as shown in the video, but it did not work for me, because it turns out that my system works differently. To achieve that all inputs are LOW as default, I have to leave the configuration in normal/ non-inverting mode and to change one line to HIGH, I have to connect it to 5V, not to GND.

 

How can this be? Why is my myDAQ with LabViEW not behaving as shown in the video?

0 Kudos
Message 1 of 7
(3,316 Views)

Well everything you say sounds logical.  In the normal (non-inverting mode) the digital will read high when it sees 5V, and low when it is attached to ground.  When it is floating and not connected, I believe it would have a pulldown so that a disconnected wire is low.

 

In the inverted mode the digital should read low when it is connected to 5V, and high when it is connected to ground.  When it is floating and not connected I'm not certain what it would do but according to the video it would go low.

 

You can test your setup in the DAQ Assistant window by pressing the Run button on the top.  Are you saying when your signals are inverted, that connecting them to ground does not produce a high?

Message 2 of 7
(3,289 Views)

hello Hooovahh,

 

thanx for replying. I attached a screenshot of my block diagramm. Everything should be connected as shown in the tutorial. However, when I set the digital Inputs as inverted, the logical OR always indicates 'true' right away, meaning that the execution immediately stops. The setting shown in the block diagramm only works when I keep the digital inputs in normal mode.

0 Kudos
Message 3 of 7
(3,262 Views)

Please post your code, not a picture of your code, you wouldn't take a picture of notepad and post it on texted based forums.  There is lots of information in those DAQ assistants and I have no idea how they are configured.

Message 4 of 7
(3,248 Views)

The issue I am seeing is how the myDAQ is actually wired up (circuit).  According to the spec, the DIO have built-in pull downs.  So with nothing connected, the DIO should measure a low.  If inverted in software, they will measure a high.


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 5 of 7
(3,242 Views)

@crossrulz wrote:

The issue I am seeing is how the myDAQ is actually wired up (circuit).  According to the spec, the DIO have built-in pull downs.  So with nothing connected, the DIO should measure a low.  If inverted in software, they will measure a high.


You know that's what I would suspect too, but the video controdicts this.  It sounds like in the video at around 1:08 it states "Currently all the input say they are high" and earlier it sounded like this is in the open state, which I don't think is correct.  The video then says if you connect it to ground you get a low signal because at this point we are in the non-inverted state.  But because of the pulldown I'd suspect it would always be low, until you wire it to 5V.  Then in the inverted state having it be ground is high, and having it be open should pull it down and also be high.  I don't think you get a low until you wire it to 5V.  Odd.

Message 6 of 7
(3,239 Views)

ok sorry, here is the code. With this code the executing will stop immediately because the inputs are inverted, but will be ok when you switch to non-inverted.

I agree with everything that you guys said so far, but the video is in contradiction to it and i really wonder how an offical NI video could be so wrong.

0 Kudos
Message 7 of 7
(3,230 Views)