LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

signal vs frequency measuremnt

Hi,

  I am aquiring signal from DAQ board from three channel (Ch0, Ch1,Ch2). I want to measure the frequency of the Ch0 signal and plot it vs Ch1/Ch2 signal. I am sweeping the frequency in the channel 0 from 25kHz to 100KHz. I am using Labview s default 'tone measurement express vi' to extract frequncy of the Ch1 and feeding it as an X input in a XY plot. My Y input is a formula relating to the voltage of CH1 and CH2. But I am getting a moving point rather than a contineous plot in my XY plot. Can anyone help me. I have attached my vi.

 

Thanks,

prem

0 Kudos
Message 1 of 7
(2,877 Views)

Hi jibon,

 

Welcome to the LabVIEW forums!

 

I don't have the hardware you're using, so I cannot run the example VI you've provided, but it appears that you're using an XY graph inside a while loop- this means that the graph will be overwritten each loop.  To preserve the previous data points, you'll need to use a memory structure of some type. 

 

The simplest way to do this is with the Collector express VI (found in the Express>>Signal Manipulation palette) , but you might also want to try a shift register with a build array function:

 

Untitled.png

 

This KnowledgeBase article and the examples it references might also be helpful- it has a few links to code that demonstrates using an XY Graph with a history:

 

KnowledgeBase   4TCFBDW8: How Do I Make an XY Graph Behave as an XY Chart?

http://digital.ni.com/public.nsf/allkb/18B56D8556D44BF18625753D006EFF7C

 

Hope that helps!

 

Regards,

Tom L.
Message 2 of 7
(2,865 Views)
That makes no sense. The Express XY Graph will retain data from one iteration to the next as long as a false is wired to the reset input.
Message 3 of 7
(2,862 Views)

Hi Dennis,

 

Nice catch! I wasn't aware that the Build XY Graph express VI had an option for that, but it makes sense- in that case, absolutely!  I suppose I'd always figured the express VI was there to take care of the slightly-awkward point-array bundling required by XY graphs. 

 

Regards,

Tom L.
0 Kudos
Message 4 of 7
(2,838 Views)

Hi Dennis

0 Kudos
Message 5 of 7
(2,819 Views)
Place a Boolean false constant on the block diagram and connect it to the 'reset' input of the build xy graph function.

When you first added it to your VI, you ignored the prompt asking if you wanted to reset the graph.
0 Kudos
Message 6 of 7
(2,812 Views)

That explains a lot. Its now working porperly. Thanks a lot!

0 Kudos
Message 7 of 7
(2,810 Views)