LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do you reset Waveform chart to blank?

Solved!
Go to solution

I have a VI with a Waveform chart in the WHILE loop, and each time I STOP the vi and re-start it, the old data remains in the display and moves out only as new data is collected.  This old data persists even after the VI is closed and re-opened.

 

Is there a way to remove the old data each time the VI is run, in other words to make the blank screen the default for the  Waveform chart?  Right now, every time I open and run the VI, there is a squiggly line in the display, from irrelevant/useless data collected previously, and it would be cleaner and less confusing if there was no old data displayed there.

 

Thanks,

Dave

0 Kudos
Message 1 of 10
(8,801 Views)

There is a History Data property for charts.  Wire an empty array and the chart will clear.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 2 of 10
(8,799 Views)

Thanks, but, still confused.  I already have a data source wired to the Waveform graph.  I cannot wire two things to the Waveform graph...so...can you offer more information? See the vi below....Waveform graph allows only one thing to be wired into it....

 

 Are you suggesting wiring an empty array each time I use the VI and then reconnecting the data source?

 

 

0 Kudos
Message 3 of 10
(8,791 Views)

Right-click the chart terminal on the block diagram and create a property node. Select the "History Data" property and set the property node to write. Wire an empty array to it (you can just right-click the property node and choose Create Constant).

Message 4 of 10
(8,775 Views)

OK, making progress but still not there...I followed your instructuions, but, now, when I run the VI, nothing displays in the Waveform chart...it is clear all the time...do I have this property node configured properly?  I selected "Change to Write" instead of "Change All to Write" but, I am out of terminals again, and can't figure out what to wire next....

0 Kudos
Message 5 of 10
(8,763 Views)
Solution
Accepted by topic author dav2010

Do your really want to clear the chart history on every iteration of the loop?  Move the property node and the empty array outside the loop.

 

Lynn

Message 6 of 10
(8,761 Views)

Of course, I don't want to clear the chart at every iteratin of the loop. I had already tried moving the property node and empty array to the outside of the loop, but, then, I get an "unwired terminal" error on the block diagram.  But, now I found that once you take it outside the loop, you have to repeat the step of "Link to" to make it work!!! 

Thank you for your suggestions.  This will make my vi's much nicer.

 

Dave

0 Kudos
Message 7 of 10
(8,738 Views)

You really should not mark your thank you as the solution. Click on 'Options' to change that.

 

I know that you have been a registered user for two years but some of your questions and mistakes are extremely basic. I would suggest some of the tutorials.

 

3 hour course

6 hour course

0 Kudos
Message 8 of 10
(8,731 Views)

 

Dennis, the selection of my response as the solution was obviously an error on my part equivalent to making a typo in an email.  I know that the solution was offered by someone other than me, and now I have corrected it! 

 

As far as I know, NI welcomes beginner level programmers, whether they have been here 2 years or 20.

0 Kudos
Message 9 of 10
(8,710 Views)

Thanks for the correction. And you are right about beginners. That is why I suggested the tutorials.

0 Kudos
Message 10 of 10
(8,697 Views)