Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

AI works for a while, then returns fixed value until reset

Hi,

 

This is probably a simple newbie thing.

 

I've got a USB-6215 and am using NIDAQmx Base. With our software, or with the acquireNScans example, I'm getting a certain number of reasonable results, and then at some point I get a fixed value which is outside the configured voltage range. That continues across program runs, and only stops when the 6215 is unplugged and reconnected.

 

For example, if I run acquireNScans once, it works as expected, collects 1000 samples and prints out the first ten, which are reasonable-looking values. I modified the code to print  out all 1000, and all 1000 look reasonable.

 

Acquired 1000 samples

data[0] = 0.336264

data[1] = 0.264918

data[2] = 0.148858

data[3] = -0.003368

data[4] = -0.174993

data[5] = -0.342672

data[6] = -0.486021

data[7] = -0.588929

data[8] = -0.638904

data[9] = -0.632329

data[10] = -0.568874

 

 

But if I run it again without unplugging/replugging the 6215, I get

 

 

dhc023738:ai jon$ ./acquireNScans

Acquired 1000 samples

data[0] = 10.883438

data[1] = 10.883438

data[2] = 10.883438

data[3] = 10.883438

 
etc

 

 

Note that this is on a -10v-10v range. 

 

I assume there's something I'm not doing, and the example isn't doing, such as clearing a buffer.

 

 Any tips?

 

Thanks,

 

Jon 

Message Edited by JonHendry on 09-28-2009 05:24 PM
Systems Manager / Programmer
Maunsell Lab
Dept. of Neurobiology
Harvard Medical School
0 Kudos
Message 1 of 2
(2,605 Views)

Good Evening Jon,

 

What signal do you have connected to the input which you are measuring?  What values should we expect to see from it?  A floating input is likely to eventually rail (go to the high or low supply voltage).  If you do not have anything connected to this input, I would expect you to see the results that you see:

  • The data looks "right" (about zero) for some amount of time.
  • It then ramps up or down (to +10 V or -10 V, respectively).
  • The only way to get it back to around zero is to unplug the card so it loses power and the inputs discharge.

If there is nothing connected, try grounding the input to an Analog Input Ground if you are measuring in Single-Ended mode or connecting the + and - inputs of a differential input to each other.  This should provide a consistent zero reading.
0 Kudos
Message 2 of 2
(2,581 Views)