Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB 6218 Analog Input Anomaly

Hello,

I recently acquired a new USB 6218 board and have begun using it for basic DE analog input.  Everything seemed to be working nominally while I was building/testing the VI, however now I'm seeing very strange behavior on the input.  About every ~1/20th second the data drops down to 0 for a few samples, then returns to the voltage on the input. This obviously causes everything to look very noisy.  This behavior is observed on all the channels regardless of the sample rate.

Any ideas? I've attached my VI for the experts to peruse if need be.

Thanks in advance,

Kevin
0 Kudos
Message 1 of 5
(5,292 Views)
Unless you are using the run continuous button on the toolbar, you can only get a single acquisition. If you are using the run continuous button, you need to stop doing that. The run continuous button should never be used except for occasional debug purposes. Put a while loop around the code that you want to run. The DAQmx Start Task and the DAQmx Stop Task shoud not be inside the loop.
0 Kudos
Message 2 of 5
(5,291 Views)
I'm not using the run continuously button. I have it set up to do one acquisition for as many samples as necessary for the user-specified acquisition length.

The anomaly is seen on the data acquired during the single DAQmx Read.


Message Edited by digitalIO on 03-05-2008 12:32 PM
0 Kudos
Message 3 of 5
(5,288 Views)

Sorry, I misunderstood what you were doing.

I don't have the exact same board but I am unable to reproduce the problem. Just using the defaults that you have for the sample rate and length of acquisition, I don't see any problems with the data.

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

Hi,

Does the signal go to zero at anytime? The USB 6128 should have a 5 volts line, if you run your code using as an input the 5 Volts does it still goes to zero?

Something that might be happening is the way you have your code set up. Number of samples per channel specifies the number of samples to read. If you leave this input unwired or set it to -1, NI-DAQmx determines how many samples to read based on if the task acquires samples continuously or acquires a finite number of samples. If the task acquires samples continuously and you set this input to -1, this VI reads all the samples currently available in the buffer. If the task acquires a finite number of samples and you set this input to -1, the VI waits for the task to acquire all requested samples, and then reads those samples. If you set the Read All Available Data property to TRUE, the VI reads the samples currently available in the buffer and does not wait for the task to acquire all requested samples.

I hope it helps

Jaime Hoffiz
National Instruments
Product Expert
Message 5 of 5
(5,256 Views)