03-17-2015 12:27 PM
Even though I would love to use a XY Graph, I am forced to use Waveform chart because I need the Sweep update mode, and the waveform chart is the only one with it
03-17-2015 12:29 PM
Even though I would love to use a XY Graph, I am forced to work with the Waveform chart because I need the Sweep update mode and the waveform chart is the only one with it... I cant get the plot to advance, and Im stuck since there is no way to input x values..
03-17-2015 12:29 PM
Even though I would love to use a XY Graph, I am forced to work with the Waveform chart because I need the Sweep update mode and the waveform chart is the only one with it... I cant get the plot to advance, and Im stuck since there is no way to input x values..
03-17-2015 12:52 PM
03-17-2015 12:57 PM
03-18-2015 06:29 AM
If your data is evenly spaced along the X axis then there is no reason not to use a chart and just set the X axis to whatever units and scale you are using. But if you have variable X data and so need an XY plot then you can mimic the chart behaviour on an XY graph by creating and maintaining your own history buffer.
The attached vi uses a shift register to maintain a buffer and deletes the first item and adds one new data point to the end each iteration. The X axis max and min are updated each time to give the 'scrolling' effect, but once you have this setup you can do all kinds of useful things like pause chart updates (even tho data is still going into the buffer) so the user can scroll around in the live data, and so on. To get a 'sweep' update instead of scrolling, then overwrite array values instead of tacking the new data to the end. Very flexible.
This vi also shows an example of plotting multiple plots on an XY graph, but check the help text because there are several formats accepted and a different one might suit your data/application better.
03-18-2015 09:26 AM
Hi..
Denis, the x values are MHz a range from 1870 to 1900 and an increase of 1 MHz by point... I set the x axis and the history but I think the problem is that the waveform chart only accepts y input, I am sure it's possible because I am recreating another software and it has a waveform chart from labview working correctly., and actually I talked with them and they confirmed that in fact they are using a waveform chart with some local variables..
Stuart, your approach looks great but the plots do not appear on my vi... and just to be sure, how would you overwrite array values? Is it by replacing the Initialize with the Replace Subset?
03-18-2015 10:00 AM
03-18-2015 10:04 AM
Hello Edu9,
I understand that you are trying to implement a XY chart, so you can see the history of data that you have on your application. I would like to appoint you to Labview example finder in order to look for an specific example called "XY Chart".
On this link you will be able to see how you can make a graph behave like a chart and it also guides you as of where to find the example mentioned before.
http://ae.natinst.com/public.nsf/web/searchinternal/18B56D8556D44BF18625753D006EFF7C?OpenDocument
Regards
David M.
Applications Engineer
03-18-2015 10:11 AM