Hi.
I am trying to make a Lock-in Amplifier using a USB DAQ device (forgot the product Id). I am facing a problem when I am trying to send the reference signal out and read the voltage drop. The problem is that both are not synchronous. The reading of the voltage is taking place everytime at different time intervals and hence I am getting a varying phase angles between the reference and the voltage signal. I tried connecting the error out of the DAQmx write to the DAQmx Read VI. And another point is that I used the example option to generate the code for the DAQmx Task. My signal out is at 1kHz, 1V and the update rate is 50kHz and 1000 samples. My analog input is done at 50kHz sampling rate and no of samples to read is 1000 (both configured in Measurement & Automation Explorer). I also read somewhere that the reading must be continuous to avoid errors. So I gave the continous reading option '-1'. Is there any way out for this problem?
Secondly, when I get those 1000 samples, I multiply them with the reference signal (from sine wave generation VI). And then I pass them through a LowPass Inv Chebyshev Filter with a cutoff freq of 40 and Sampling freq as 50khz. The mean of the filtered output gives mean absurd values. But if I use the default values, Fs=1Hz and cutoff as 0.49 I am getting some proper values. Why is this happening?
Thanking You.
Gokul.