LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measure Frequency of a waveform using Tone measurements block

Solved!
Go to solution

I am trying to read a waveform using an oscilloscope...I have installed the LabVIEW driver for the scope and I was able to read the waveform using the waveform chart in LabVIEW (I used the example programs provided). However, I want to measure the frequency of this waveform....I tried to use tone measurements block...however, it shows error saying that i have connected two terminals of different data types...Is there some wave to convert the data type of the waveform so that it can be connected to tone measurements? or is there some other way to read the frequency of the waveform ?

0 Kudos
Message 1 of 5
(371 Views)
Solution
Accepted by topic author Anupama07

You are, unfortunately, using an Express VI that uses the Dynamic Data Wire (which I never learned to appreciate).  Your input data are a 2D Array of "I'm not sure what" (nor do I understand why you change it from a 1D Array to a 2D format, without adding any new data).  There's an Express VI "Convert to Dynamic Data" (I found it by asking Quick Drop find Dynamic Data, which says it is on the "Signal Manipulate Express VIs" palette) that will take your 2D Array and make it DDE Wire.

 

Bob Schor

0 Kudos
Message 2 of 5
(336 Views)
Solution
Accepted by topic author Anupama07

Your data is an array where each element is a cluster of an x and y array.

 

Can we assume that the x values are spaced equally? If this is a "tone", they most likely are, so why are you carrying all that redundant data around where a plain graph would work equally well (after adjusting x0 and dx). Note that most signal processing expects equally spaced values (random spacing would make the math significantly harder, still doable, but typically avoidable!).

 

Also, since you have an array of signals, each will have it's own frequency and you would need N tone measurements (e.g. autoindexing on an array of signals creating an array of tone results), even if the array only contains one element.

 

In any case, you can probably get x0 and dx from the first two values of the x array, allowing you to create proper waveform data for analysis.

0 Kudos
Message 3 of 5
(323 Views)

Thanks...I modified the program slightly and used the Convert to Dynamic Data to read the measurements. 

0 Kudos
Message 4 of 5
(300 Views)

@Anupama07 wrote:

Thanks...I modified the program slightly and used the Convert to Dynamic Data to read the measurements. 


We can't really tell what you did, because your array of cluster cannot directly be converted to dynamic data, you need to jump through some hoops.

 

(Also be aware that dynamic data if often a poor choice, because it can contain many different things and we cannot really tell from looking at the wire.)

 

Once you show us what you actually did, we can potentially offer suggestions for dramatic improvements. Your choice! 😄

0 Kudos
Message 5 of 5
(288 Views)