09-28-2009 05:23 PM - edited 09-28-2009 05:24 PM
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
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
09-29-2009 05:05 PM
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: