11-25-2011 08:24 AM
Hi all,
I'm trying to create a lock-in amplifier by using the LockinPLL.vi, lockinDemodulatorSettings.vi and LockinDemulator.vi which
comes with the NILock-inStarupkit. The problem is the PLL part. I can't get the frequency or the phase information of the reference signal. If the PLL is updated the output frequency is 1e-6 and phase is NaN. If the PLL is not updated the frequncy is 100 and TC is 0. The attached PLL_tester.vi is a simlified version of the code but the priciple what I'm using is the same.
I have the NI-USB6343 DAQ and the output sampling rate is 500k.
Another question: Why the LockinPLL has to be run twice before the output is updated?
Thanks is advance.
11-29-2012 02:32 AM
I have the same trouble.
If you have found a solution, would you comment on that?
11-29-2012 02:41 PM
Yes, I got it working.
Because my reference signals type is waveform I first had to get it's real values "Get waveform components" "Y" then change it to array "Build Array" and finaly rotate the array "Transpose 2 D Array". This signal goes to PLL "Signal (in)"
The frequency you use and want the lock-in to pass through HAS TO BE an integer of the sampling frequency. Like my fs is 500 kHz and modulation frequency is 15625 Hz. -> 500000/15625=32. So I can't use for example modulation frequency 15500.
Hope this helps.
11-29-2012 10:40 PM
Hi, niiraka,
I'll give it a shot. Thank you.
08-08-2013 01:19 PM
Niraka,
I have the same problem. However, it seems your solution does not work for me. Just to clarify sth, the fs you put in the PLL is it the same with the fs of your DAQ card?
Could you please convert your vi given above in LV2010 because I cannot open it?
Dimitris
08-19-2013 04:46 AM
Hi Dimitris,
sorry for late reply. I was on summer holiday.
Yes. The sampling frequency fs of the DAQ is the same as the sampling frequency fs I put in to the PLL. Attached the vi in 2010 version.
Niiraka