From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform chart x values, using waveform chart as XY graph

Solved!
Go to solution

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

0 Kudos
Message 11 of 46
(1,655 Views)

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..

0 Kudos
Message 12 of 46
(1,653 Views)

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..

0 Kudos
Message 13 of 46
(1,653 Views)
What sort of x values are you talking about? As already mentioned, if the x values increase by a constant amount, you set the axis once and leave it alone.
0 Kudos
Message 14 of 46
(1,644 Views)
What I should have said is constant and regular intervals.
0 Kudos
Message 15 of 46
(1,636 Views)

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.

 

xygraph-bd.png

xygraph-fp.png

0 Kudos
Message 16 of 46
(1,616 Views)

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?

0 Kudos
Message 17 of 46
(1,599 Views)
A chart is supposed to only accept a y array. Your chart can display the x axis you want by setting the offset to 1870 MHz and the multiplier to 1 MHz. This is a right click option and a pretty basic chart operation. No local variables are involved. You would use property nodes if you wanted to programmatically set it.
0 Kudos
Message 18 of 46
(1,591 Views)

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

0 Kudos
Message 19 of 46
(1,589 Views)
David,

Your link is to a private ae page.
0 Kudos
Message 20 of 46
(1,583 Views)