07-29-2009 08:28 AM
Hello everyone,
I am trying to add a control to a waveform chart that will allow me to change the number of points displayed on the X-axis. The chart is updating every half a second and currently it shows the most recent 20 points of data (I did this by right-clicking the chart and unchecking the "autoscale" box and entering 0 for the minimum and 20 for the maximum). I would like to be able to enter in how many points I would like to see, whether that be 20, 50 or 116 etc etc. I have tried using property nodes to set the X minimum and X maximum but that causes the graph to flash back and forth between displaying that fixed points in time and the current data.
I don't just want to view a range either (defined by a min and max), I want to set the number of points to be displayed so that the plot will retain it's real-time updating like it does by default, but showing the the most recent <number of my choosing> points of data.
My source code is quite messy at this point, but if this isn't an easy fix and you need an example, I might be able to put something together.
Thanks in advance,
-Aaron
Solved! Go to Solution.
07-29-2009 08:53 AM
Ok, here is some example code. Hopefully this will help you understand my question better.
-Aaron
07-29-2009 09:39 AM
Hi Aaron,
If you want to see the most recent n samples in your chart while n can be modified during runtime, than I might have a solution for you...
Please check out the modified VI.
Regards,
Thomas
07-29-2009 09:43 AM
I'm sorry, I should have mentioned that I have labVIEW 8.5.1. Do you think you could save the .vi as an earlier version? or take a screenshot?
Thank you!
07-29-2009 09:49 AM
07-29-2009 09:59 AM
Yes! That works perfectly, this is exactly what I was looking for!
Thanks!