06-21-2013 01:56 AM
Hi all,
im not sure if this has been solved before but my problem is, is there a easier method if i create a subvi containing a waveform chart and i want to clear the data in the chart after each run so that new values from the main vi can be plotted without the previous data plot. I placed the "history data" property node and wired it to an empty array in the subvi but when i ran the program, the graph doesnt plot at all..
Regards
Adrian
06-21-2013 02:35 AM
Why you want to clear the chart from main. Pass the data from main and before passing the data use invoke node and clear the chart in subvi.
06-21-2013 03:13 AM
Yup, the data actually comes from main VI. Since there is data from the main VI goes to the subVI (actually consists of just a waveform chart for reading data), when i wired a constant array to the "history data" in the subVI, it doesnt plot but just gives an empty chart.
But i'll try out what you said and see if it works
Thanks and appreciate your help
06-21-2013 03:26 AM
You might have fun trying to find an invoke node for a Waveform Chart to clear data...
Property nodes are the way forward. You're essentially wiring an empty array to either Waveform Graph >> Property >> Value (for a waveform graph) or Waveform Chart >> Property >> History Data for the chart.
Without seeing your code, my guess is that you're sending data to the chart and then sending an empty array to History Data *after* this. So you're plotting data and then clearing it. You can use the error connectors for the property node to ensure it runs before you send new data to the chart, or similar techniques.
Have a look here for an example.
06-21-2013 04:20 AM
Post the VI.
06-22-2013 04:52 AM
hmm ii'll try using the invoke property method.
Appreciate and thanks for the help guys!