Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring analog signal period with DAQ

This is my first time using DAQ/Labview, and I can't find anything similar on the forums, so I apologize if I lack basic understanding of the system.

 

I'm trying to measure a thin film growth through interferometry. I'm using the USB6009 DAQ to measure the analog outputs from two photodetectors. The signals are on the order of 0.025Hz with decreasing DC level.

 

To find the thickness at a given time, I need to find how many peaks have occured in the past....and I'm not sure how to do that. Setting a trigger level won't really work because the signal decreases overall.

 

What is the best way to approach this?

0 Kudos
Message 1 of 5
(2,993 Views)

Ayin, 

 

Welcome to the world of DAQ/LabVIEW! It sounds like you need the "Waveform Peak Detection VI". One of the outputs is the number of peaks found. The Help document describes this VI in depth. 

 

Let me know if that works!

 

Katie

Katie Collette
National Instruments
0 Kudos
Message 2 of 5
(2,978 Views)

Hi Katie,

 

Thanks for the prompt reply. I still have a few questions about using this VI that the help document does not seem to answer.

 

So the threshold input is described as: "threshold instructs the VI to ignore peaks and valleys that are too small. The VI ignores peaks if the fitted amplitude is less than threshold. The VI ignores valleys if the fitted trough is greater than threshold."

But it's not immediately clear to me how the fitted amplitude is measured...how does the VI determine the DC level from which the amplitude is evaluated against?

 

Also, the waveform I'm measuring has a decreasing DC-level on the order of the amplitude (in a few cycles, the DC-level will have decreased an amount approximately that of the wave's amplitude), how does the VI handle it in this case? I suppose the answer to my previous question would help solve this...

 

Thanks!

0 Kudos
Message 3 of 5
(2,935 Views)

Ayin,

 

With a signal like yours you will need to do something a little more complicated.  You will need to break the data into segments with each segment containing only one or a few peaks.  Find the maximum and minimum values within that segment.  Set the threshold based on those values.  Find the first (highest) peak. Find the first valley after that peak. Break the data at that point, effectively removing the first peak.  Repeat for the next peak.  You will need to do some "bookkeeping" to identify the peaks with respect to the original data timing.

 

This is not particularly difficult unless your signals are noisy or get so small as to make it hard to see or identify the peaks.  It might be a good idea to sit down with pencil and paper and a plot of several cycles of your data and plan how this would work.

 

Lynn

0 Kudos
Message 4 of 5
(2,930 Views)

How fast is you DC level decreasing?

Post some data in an array or graph (Make current values default, save and post )

 

Slow DC changes can be removed with a high pass filter.. (say 1/10 of you periode of interest)

Or substract the moving mean value of roughly one periode (or the last periode detected) , look at the point by point vis...

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 5 of 5
(2,922 Views)