Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 69327

daqmx write

$
0
0

Hello,

 

I am trying to simultaneously acquire a signal while generating/writing a chirp (swept sine wave) signal which varies from 0-800 Hz. Previously, I have been able to do so using a timed-loop with the 1 KHz clock and 100 msec period. The sampling rate for the DAQmx Timing for generation was 4000 Hz and the number of samples per channel was set to 400. In the timed-loop, the samples per channel for the DAQmx write VI is set to 400. I used "Creat Analog Signal" express VI within the timed-loop to generate the chirp signal using a sampling rate of 4000 Hz and number of samples of 400. The FFT of the acquired signal was clean with almost no noise in it.

 

Now, I changed the above parameters such that the VI can be used for closed-loop realtime control. Therefore, I reduced the samples per channel in all instances to 1, and used the 1 MHz clock with 200 micro-sec period, acquiring and generating at 4000 Hz. However, evaluating the FFT the acquired signal, I realized that it contains a lot of noise, while the previous code with 400 samples per channel didn't contain any noise for a frequency band of up to 1000 Hz.

 

I think the problem is coming from the high sampling rate with small number of samples per channel for the DAQmx write VI. My feeling is that the DAQmx does not have enough time to write every sample to the buffer. I tried different values of the timeout for DAQmx write (and DAQmx read) VI's in the timed-loop but it didn't work....I have given the latest VI here. Can anybody help me where the problem is arising?

 

Also, is there any way that I can monitor the actual values of the written data (i.e. output of the DAQmx write)?

 

Thanks,

 

   


Viewing all articles
Browse latest Browse all 69327

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>