LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is my idea feasible?(pulse measurements.vi)

Dear All,
I am using the "Pulse measurements.vi" to analyse the waveform get by DAQ card. And it need at least 1.5 periods of
waveform data. Due to the unknown frequency of the signal, I don't know how to set the sample rate which is too fast
that one time of N sample acquisition won't obtain the enough period for the vi, while too slow that the high
frequency signal will not be get.
So I am wondering that if the sample rate can be adjust dynamic. For example, at beginning a high sample rate is
initialed while if the pulse measurements.vi give error that "the waveform did not cross the mid reference level
enough times to perform the measurement", a lower sample rate will be adjust until the error is not absent.
I don't know if it is feasible or someone have done some experience of this.
If some example vi is absent, would you please attach it? Or if there is some other good way to solve it?
Thank you very much.
 
Hugo
0 Kudos
Message 1 of 7
(4,093 Views)
Hugo,

With most DAQ cards you need to stop the task before changing the sample rate and then restart it. It is likely that you would miss some data during this time.

Try an alternate approach: Always sample at the fastest rate you need to capture the shortest pulse you expect in your signals. Then extract a subset of the data which has only enough data to measure the parameters of one pulse at a time. It requires some extra "bookkeeping" to know which parts of the signal have been analyzed, but will allow you to get data on each pulse even if there is much variation between pulses.

Lynn
Message 2 of 7
(4,065 Views)

Lynn,

        Thank you for your suggestion.

        Would you please give an example vi? I have understand "extract a subset of the data which has only enough data to measure the parameters of one pulse at a time"

        How to know which subset of the data is the enough data?

         Thank you.

 

Hugo

 

0 Kudos
Message 3 of 7
(4,055 Views)
Hugo,

That depends on the characteristics of your pulse. Do you have some typical data which you could post showing the kinds of pulses you get?

Lynn
Message 4 of 7
(4,039 Views)
Lynn,
       Thank you!
       The signal I get is not exactly certain.
       I wrote a vi under your suggestion but can't be run well.
       After clearing the error,  it appears once again.
       Thanks for your help!
 
 
 
 
Hugo
     
0 Kudos
Message 5 of 7
(4,022 Views)
Hugo,

You do not initialize the shift register so the first iteration has an empty waveform being sent to the Pulse Measurements.vi. The when an error occurs, the zero case writes an empty waveform again.

I added another case structure which puts the first generated signal into the shift register on the first iteration. In the zero case of the inner shift register I removed the constant and wired the data straight through. I also added a short wait so the loop does not spin as fast as possible and consume all available CPU time.

Lynn
Message 6 of 7
(3,990 Views)

Lynn,

       Thank you!

       I have modified your vi which runs better:)

       In the zero case of the inner shift register I wired the new data to it which can measure the waveform dynamicly when I change the frequency during it running:)

      Thank you for your help!

    

 

Hugo

0 Kudos
Message 7 of 7
(3,983 Views)