08-22-2013 04:44 PM - edited 08-22-2013 04:47 PM
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
08-22-2013 05:20 PM
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:
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,
08-22-2013 05:29 PM
08-23-2013 10:03 AM
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,
08-23-2013 11:35 AM - edited 08-23-2013 11:41 AM
Hi Dennis and Tom,
I did not understand what you are suggesting. I am quite new in labview, so could you please elaborate a little bit?
08-23-2013 12:08 PM
08-23-2013 12:12 PM
That explains a lot. Its now working porperly. Thanks a lot!