LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Lock-In amplifier capabilities

Hello,
 
I am using the Lock-In amplifier start-up kit. I generate an output waveform and get 2 inputs back - reference and measured signal.
I connected the output with a coax wire to the 2 input channels (using BNC-2120) in order to test the program and the results aren't good. When I increase the frequency of the waveform the results even get worse (up to 1000 Hz needed).
 
I am using PCI MIO-16E-1 (PCI 6070), max reading rate 1.25MSa/s, and I understand that the start-up kit was written to much lower rates. I have another DAQ card PCI-6143 which has A/D converter for each channel (I think) but do not have analog output. I thought about using this one as input only and the first one as output, but I don't know how to do it (need RTSI cable?)
 
I have 3 questions:
1. What is the best configuration for my purpose, 1 card or 2 different ones? (also available to me PCI-6154)
2. How do I synchronize 2 different cards?
3. How can I find the optimum input and output rates? What are the limitations (min/max requierments) of the Lock-In amplifier? Is it possible to see the censored parts?
 
I am using LabView8.0
thank you,
Noam.
0 Kudos
Message 1 of 11
(4,204 Views)

Hi Noam,

It seems that a good option for you will be to use the PCI-6154 for both the output and the input since it has analog outputs and is simultaneous sampling. This will make synchronization a bit easier since you will only have one board and will not need a RTSI cable to transfer signals between two PCI boards. There are good same device multi-function (analog input and output) synchronization examples in the Example Finder. The Example Finder can be accessed through the Help menu in LabVIEW. These DAQmx examples can be found browsing by task under Hardware Input and Output » DAQmx » Synchronization » Multi-Function. A good one to start with may be Multi-Function-Synch AI-AO.vi. More information about synchronization can be found in this article or in the DAQmx Help. You can find the optimum input and output rates by just experimenting with a few values until you achieve something acceptable for your application. Just remember that a higher sampling rate is useful when trying to accurately reproduce your signal and that the minimum input sampling rate for the toolkit is 50kHz.

Regards,
Kent
Applications Engineer

 
0 Kudos
Message 2 of 11
(4,178 Views)
Thank you.
 
First of all, I was wrong. Unfortunately I don't have PCI-6154, but PCI-6251 which is also M-Series. I think it means that I still need to use 2 cards. How do I do it then?
If I use it anyway as a simulataneous device for an output and 2 inputs, what is the best rate I can use?
 
About the Lock-In Amplifier rate, my problem is that as I increase the frequency of the generated waveform, the result gets worse everytime. How can I decide the best rate which would fit every frequency I choose?
0 Kudos
Message 3 of 11
(4,160 Views)
I would like to show you the error massage I encounter:

Error -200279 occurred at DAQmx Read (Analog 2D DBL NChan NSamp).vi:1
Possible reason(s):
Measurements: Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.
Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.
Property: RelativeTo
Corresponding Value: Current Read Position
Property: Offset
Corresponding Value:
Task Name: _unnamedTask<DD>

I don't want to increase the buffer size (I read exactly the amount I need) and I do specify a fixed number of samples. All I am left is changing the reading rate, but I get this massage anyway at some time. I noticed that the time it appears is influenced by the rate parameters and the amount of functions the VI executes. How do I know which function "occupies" my processor the most?
0 Kudos
Message 4 of 11
(4,152 Views)

Hi Noam,

Without the PCI-6154, the best way to proceed will be to use a RTSI to synchronize the simultaneous sampling card with a card providing the analog output. The simultaneous sampling is essential for the lock-in amplifier. There are examples in the Example Finder which show how to share the sample clock and a start trigger between the two cards. Instead of looking under Hardware Input and Output » DAQmx » Synchronization » Multi-Function, check under Hardware Input and Output » DAQmx » Synchronization » Multi-Device. There is also good information about synchronization and related topics such as signal routing across RTSI in this article.

The rates of both the analog output and input will be the same since you are sharing the sample clock. One thing to check is to make sure that the rate is at least twice as high as the highest frequency that you will be testing. It is not a bad idea of start off with a high rate to ensure that the sine wave that you are generating is smooth.

The error that you are seeing is a common overflow error. While you do not have to increase your buffer size to solve this error, you may have to read faster. The buffer size is different than the number of samples you acquire each time you call the DAQmx Read function. The number of samples to read each time can be changed by wiring a different value to the DAQmx Read function. If both of these values are set, then the way to make sure the buffer does not overflow is to call the DAQmx Read function more often. This will require making sure that there is nothing in the loop that is slowing it down. This may require moving all processing functions to a separate loop. 

Regards,
Kent
Applications Engineer

 
0 Kudos
Message 5 of 11
(4,116 Views)
Thank you for the links and advices. It was very helpful.

1. If I use the E-series DAQ card for simultaneouse read, will I lose the rate my card can offer for a single channel or will I lose measurment accuracy?
2. What do you mean by "The buffer size is different than the number of samples you acquire each time you call the DAQmx Read function"? what samples will the "DAQmx Read" function acquire if I set the "no. of samples per channel" to a larger value than the DAQmx Write function is suppling? and if the Read function has left some samples in the buffer and I need it for the rest of the loop's process?
0 Kudos
Message 6 of 11
(4,097 Views)

Hi Noam,

Your E-Series card will not be simultaneous sampling. In addition, the overall sampling rate will drop since it must be aggregate among all of the channels. A more detailed explanation can be found in the E Series Manual on page  2-30 under the Analog Input Timing Signals section. As for the buffering, I was mainly trying to say that the buffer size will be larger than the number of samples being read each time the read function is called. All of the data will be stored in the buffer and pulled out in the order it came in to ensure that you are receiving all of your samples.

Regards,
Kent
Applications Engineer

 
0 Kudos
Message 7 of 11
(4,071 Views)
Thank you very much.
Now I have another question:

I am acquiring data in a continous manner and this is the cause of the buffer problem. As a matter of fact, I don't mind pause the acquiring for a few seconds, just for the calculation, and than continue it. Do you have any suggestion on how to do it?
0 Kudos
Message 8 of 11
(4,051 Views)
As Kent mentioned, you could move all processing to a separate loop.  This is called the Producer/Consumer architecture.  Essentially you separate the acquisition from the post-acquisition processing with a software queue.  If the post-acquisition processing cannot keep up with the acquisition, the samples are stored in the “software buffer”.  
Rod T.
0 Kudos
Message 9 of 11
(4,009 Views)
Do you have a LabView 8.0 version for this example?
0 Kudos
Message 10 of 11
(3,990 Views)