LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reset one of the plots in a Waveform Chart

Hi, 

I have 8 plots in a Waveform Chart. I know how to reset them all using the PropertyNode/History, and writting a 0 on it as it has been done in previous posts.

 

In this case, I need to reset only one of the plots in the chart. I've tried using the PropertyNode/ActPlot and PropertyNode/History, but it's not working at all (it resets all the plots in the chart). 

 

In the picture below, you can see I'm trying to reset the History of plot 2 when a button is pressed, but in fact it is resetting all the plots in the chart. 

 

image.png

 

 

Thanks in advanced, 

Irene. 

 

0 Kudos
Message 1 of 7
(3,004 Views)

 

Get history and reset only one plot

 

chart.png

 

0 Kudos
Message 2 of 7
(2,986 Views)

@Artem.SPb  ha escrito:

 

Get history and reset only one plot

 

chart.png

 


Using this code, the plot 2 only disappear while the button is pressed, but when released it appears again (and the data has not been reseted, so I can still see the old data that is supposed to be deleted). Maybe I have used the code in a wrong way. Any other idea?

 

image.png

 

 

 

0 Kudos
Message 3 of 7
(2,964 Views)

Wrong function.

 

The snippet used Replace Array Subset.  You used Insert into Array.

 

The only other thing is I don't know how well this idea will work with that dynamic datatype.

0 Kudos
Message 4 of 7
(2,953 Views)

@RavensFan  ha escrito:

Wrong function.

 

The snippet used Replace Array Subset.  You used Insert into Array.

 

The only other thing is I don't know how well this idea will work with that dynamic datatype.


Oh! Sorry for the wrong function! Anyway, I've just changed it and the functioning is the same (the plot disappears while pressing the button, but appears again when released, so it's not deleting the data). I don't know what else can I do, I thought this would be easier. Any other suggestion? Thanks.

0 Kudos
Message 5 of 7
(2,948 Views)

Let us see the code with sample data.  You have almost certainly written yourself a race condition 


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 7
(2,938 Views)

So what do you actually want to see after the plot has reset? In order not to get padded with zeroes, you might have to replace the specific history data with NaNs.

 

Here's a very simple example. See if it can give you some ideas.

 

(Sorry, I don't do dynamic data, so you are on your own if you want to keep going that route. ;))

 

ResetTrace.png

0 Kudos
Message 7 of 7
(2,917 Views)