I'm working on a waveform graph for a project, I want to use a node to control the time base of the graph. It works but during switching the graph will show more divisions than I designed for a very short period of time, which is annoying. I have attached the vi and I'm appreciated if anyone could help me about this problem.
已解决! 转到解答。
You have three processes operating in parallel inside your loop -- setting the properties of your graph from the Time control, building and displaying the Waveform, and waiting 100 msec. All of these must take place before the While loop can do the next step. Which one of these goes first? Who knows? You don't sequence them, so the order is arbitrary.
The Wait is the simplest to dismiss -- it doesn't "do" anything except "wait" -- if the Wait starts before or after the Graph, it hardly matters. How about changing the scales and plotting the Graph? Well, here you might want to always do it in the same order, but I have no idea which you should do first. Note that if you make use of Error Lines, you can use them to sequence things that you want to take place in a particular order (most of your code uses functions without Error Lines -- the exception seems to be the Property Node for the Waveform Graph).
Here's another idea -- are you planning to do anything with your Array (which you only have after you stop the While loop)? If not, don't bother using an Array and a Graph, but simply plot the single "latest value" onto a Chart (which takes single points and scrolls those values across the Chart ...).
Bob Schor
Thank you for your suggestions. I have sequenced the three functions as "change the scale" to "graph" to "wait 100ms", but the problem seems to still be there. I want to use array to store the data and show the data on the graph in different ways in the later version (zoom in , zoom out , scroll left and right when the graph is paused.)
Sorry, I've had a meltdown -- in the process of removing LabVIEW 2010, 2011, 2012, 2013, 2014, and 2015 and doing a re-install. This PC will be out of commission for at least a day ... got bitten by some "future features" ...
Bob Schor
Just found the solution, it seems that I have to sequence the property node's function or the graph will be confused. Your suggestions enlightened this solution. Thank you!