LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

frequency and duty cycle measurement

The message seems to indicate that the waveform does not cross the axis as would be normally expected.  That would be strange for a sound wave.. Looking at the graph, it appears normal.  I'd have to look at the code and sample waveform to see what's going on.  Unfortunately, I wouldn't be able to look at this until possibly tonite.
 
RayR
Message 11 of 39
(1,711 Views)

Hi Suneel,

It has been my experience that Timing and Transition Measurements VI does not work well for data such as sound (or heartbeats, for example), it is more designed for square waves.  The Tone Measurements VI should work fine for extracting your fundamental frequency, and Spectral Measurements will give you the entire frequency spectrum if you are looking for that. 

Why do you need duty cycle for a sound wave?  Is the entire sound pulsing on and off?  I don't think Timing and Transition Measurements can handle that kind of a signal.

Regards,

Jeremy_B

Applications Engineer
National Instruments
Message 12 of 39
(1,703 Views)

Hi Jeremy,

What i understood from your mail is  i'm using wrong Express VI's to calculate the Duty cycle and Frequency,.

And for your questions.

Why do you need duty cycle for a sound wave?  Is the entire sound pulsing on and off?  I don't think Timing and Transition Measurements can handle that kind of a signal.

  1. In our automotive environment we call them Chimes (a small beep sound) which is a small sound wave recorded.
  2. Few beeps may be recorded within a wave (means a dual sound - wave within a wave)
  3. Its not for the entire wave i need to calculate (Duty cycle and Frequency), i shld calculate at a particular time period.

Usually, when doing manually what i would do is i will connect the output probes to a CRO and calculate (duty cycle and Frequency) at that particular time interval.

The same thing i thought of automating it with the help of some labview built in VI's

 

If not the Tiiming and Transition measurements could you please tell me the correct VI's to be used?

 

Cheers,

Suneel.V

0 Kudos
Message 13 of 39
(1,701 Views)

Thanks Jeremy,

I didn't know that...

Suneel,

He mentionned "Tone Measurements VI".

RayR

0 Kudos
Message 14 of 39
(1,688 Views)
 
So Joe,
 
You mean to say "Tone Measurements VI"  would give the correct frequency, am i right?
But i'm also interested in Duty Cycle.
 
Apart from that, are there any other built in VI's available, which would yield the same result?
 
Cheers,
Suneel.V
0 Kudos
Message 15 of 39
(1,686 Views)
Hi Suneel,

I don't think we have anything that can specifically do that with that kind of signal.  However, you might want to take a look at the following link: http://digital.ni.com/public.nsf/allkb/8FA2F34F2BF90E3A86257266007AAE30?OpenDocument

It has a VI which will clip your analog signal, which can have the effect of converting your signal into a square wave.  If you do that, the Timing and Transition Measurements VI might work with that.
Regards,

Jeremy_B

Applications Engineer
National Instruments
0 Kudos
Message 16 of 39
(1,677 Views)

Hi Jeremy/Joe,

Good morning!!!!!
Need your help again..

After developing the VI with the Timing and Transition measurements, Tone meaurements it looks ok and i've given it to the validation team to compare the Duty cycle and Frequency measured with CRO.

Now the new requirement i got from my manager is the extracted waveform should be coming in multiple windows. (at least 4)

I thought its a simple task and tried to modify it.

But failed in doing that.

Please modify the VI attached below.

 

Awaiting for your reply.

 

Cheers,

Suneel.V

0 Kudos
Message 17 of 39
(1,647 Views)
Hi Suneel,
 
You can then use a for loop to loop through all of your cursors and extract each waveform subset.
Regards,

Jeremy_B

Applications Engineer
National Instruments
0 Kudos
Message 18 of 39
(1,635 Views)

Hi Jeremy,

I believe that i'm not clear in my before VI and mail.

Please see the attacehd VI now, it doesnt require multiple cursors, it needs multiple extracted waveform windows.

Where the first selection of the cursors should extract it and show the extracted waveform 1

and the next selection should extract and put it in the extracted waveform 2

and the next in EW 3

and again the loop should continue..

Please let me know how to implement the same.

waiting for your reply

 

Cheers,

Suneel.V

0 Kudos
Message 19 of 39
(1,630 Views)
Hi Suneel,

Are you wanting to get a new subset each time the user makes a new selection on the original graph?  You will still need a loop around the logic to do this.  You can set up while loop which will wait for the user to make a new selection, and then load the waveform into a new graph.  You could have a button the user can press to indicate they have made their selection.  An event structure would be useful for this type application (waiting for user input).
Regards,

Jeremy_B

Applications Engineer
National Instruments
0 Kudos
Message 20 of 39
(1,620 Views)