This widget could not be displayed.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Having trouble determining frequency from data

I am looking to try to determine the frequency that an object is rotating at.  The data file attached is the measurement made by an oscilloscope as last passes through and opening in this object as it is rotating.  I have attached the vi below.  I am able to get the height and the timestamp for the first peak, but I am having trouble getting the second peak.  If I do array max and min in takes me further down, but has the incorrect timestamp with it. 

 

I have also tried using the pulse measurement channel vi but every time I try to run that I get a warning saying

 

So I am looking for a little guidence in trying to get this solved.  I would like to be able to go and determine the height and timestamp of the second peak.  I dont need a vi that calculates the frequency for me, Im fine programming the math.  But if there is something I am missing with the pulse measurement vi, that would make this a lot easier.

 

One additional note:  Yes I am working in 7.1, I am a grad student and it is a department copy, so no I dont have money to uprgade to a newer version.  So if you could do me a favor, if you do post some programming but can save to 7.1 for me to open and look at can you please do a screen shot.

Download All
0 Kudos
Message 1 of 4
(1,939 Views)

The first thing you should do is change the format specified of the Read From Spreadsheet file to something other than the default. With %.3f, you are throwing away all of the significant digits. Try %.10f.

Message 2 of 4
(1,932 Views)

Take a look at the attached.  It uses the Peak Detection function to find the peaks in your data.

 

I set the threshold to 80% of the max value and then set the width of the peak detector wide enough to encompass one peak but narrow enough not to reach a second.  I did find if I make it much bigger it misses the one at the end.

Randall Pursley
Message 3 of 4
(1,918 Views)

that works perfectly for what I am looking for.  Definately didnt think of doing it that way.  Thanks for your help!

0 Kudos
Message 4 of 4
(1,911 Views)