Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 69513

Clear XY Graph & Delete Old Data

$
0
0

Hi there -

 

I have an XY graph that receives the time since start (x) and the temperature (y) at user-defined intervals (let's say 5 seconds). The graph starts plotting when the user presses a "Start" button and stops when the user presses the "Stop" button. [I know, how creative!] There is one loop that monitors the status of the buttons and then another loop in parallel that adds the current reading to the XY graph using Build XY Graph Express ("reset" is set to FALSE), and it uses "Elapsed Time" to space out the data points.

 

When the VI is running, I'd like the user to be able to start and stop multiple times. This means that the XY graph needs to be reset. I've tried a few methods, but they only clear the graph temporarily, and then when the next point is plotted, the old points reappear.

 

I've been searching all over for a solution to this, but have not been able to find one. I've tried reinitializing to default, writing an empty array to the graph, sending NaN to both x and y while setting "reset" to TRUE, and a few other variants. [An idea I had: is there a way to wipe all memory associated with a graph?]

 

My code would be much too confusing to post, so I hope you can help me with my description alone.


Viewing all articles
Browse latest Browse all 69513

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>