LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to clear a graph during runtime?

Hi everybody,

I want to clear a graph during runtime using a property node, but I didn't find any property doing this. Is there another solution, or which property I have to use?

Every answer I accept with thanks!

snork
0 Kudos
Message 1 of 4
(3,285 Views)
You must re-initiate the History Property node.
After Creating the Property Node, Right click and make a control. (feel free to alter the control to "non-visible" on the front panel)

You may want to embed this method in a Case Based state machine structure.

Let me know if you need some example VIs...

Good Luck!
Chances are if you have seen VI in the forest it hasn't fallen.
0 Kudos
Message 2 of 4
(3,270 Views)
Hi Snork,

The method described by X works only for waveform charts (Property node: History data). A waveform graph doesn't have a comparable property node. You have to wire a uninitilized array to the graph to clear it. There is an example which ships with LV which shows how to do that. The VI is calles "How to Clear Charts & Graphs.vi". I recommend to have a look at it.

Hope this helps.
Regards,
Luca
0 Kudos
Message 3 of 4
(3,262 Views)
Two clarifications to the previous solutions:
1) it is easier to create a BD constant and make it an empty array to clear the history of a Chart.

2) To clear a graph, wire an EMPTY array, again, this can be created by creating a BD constant (just make sure it is empty!)

In both cases, make sure the chart or graph contains the data type you will be writing to the graph before creating the constants.
Regards,
Doug Wilson
0 Kudos
Message 4 of 4
(3,243 Views)