LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Odd DAQ behaviour - flatline?

I am just writing some simple VIs in LabVIEW 7.1 to check if my DAQ card (NI 6220) is working properly. So far, I have trialled the card with a frequency generator and a photosensor. With both, the signal rises steadily to around 10.5 V, then flatlines. For the frequency generator, the pulse shapes are always correct, but seem to be multiplied by a factor of time (e.g. sin(t) would resemble tsin(t)). I wondered if this was a charting quirk, so set indicators to clear when called. However, this has changed nothing. Re-running the VI just starts the signal at the flatline, it does not even have the grace period leading up to it. Closing and re-opening LabVIEW does not work either. This makes me think it is a memory problem with the DAQ card.

 

Any ideas?

0 Kudos
Message 1 of 3
(2,062 Views)

That is a clear sign of you montioring the wrong signal, not having your signal properly wired to your card, or not having the measurement setup correctly,

 

NI DAQ cards will float if no signal is connected to them.  Typically, you will see this "sine" type behavior, where the signal will rise, max out for a while, then start coming back down to bottom out for a while and back again.

 

So, I would double check that you actually have the signal and ground wired correctly and you are monitoring the channel you have it wired to.  Make sure you have your ground connected to AIGND.  Even if you are runnign differential, NI cards require the signal to be in range of its ground signal.  So, even if you have a 5V pk-pk signal, if it is 20V off of the card ground, the card won't be able to measure it.

 

Next, make sure you have the signal measurement setup correctly.  If you only have one wire hooked up, then you need RSE, if two wires, Differential.  Also note that if you are doing a two wire measurement, you do not use AI0 and AI1, it would be AI0 and AI8.

0 Kudos
Message 2 of 3
(2,060 Views)

Thank you for your quick response. It seems all I had to do was change from differential to RSE - despite LabVIEW choosing diff. automatically.

0 Kudos
Message 3 of 3
(2,052 Views)