11-21-2018 05:10 AM
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.
Thanks in advanced,
Irene.
11-21-2018 05:58 AM
Get history and reset only one plot
11-21-2018 08:30 AM
@Artem.SPb ha escrito:
Get history and reset only one plot
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?
11-21-2018 09:12 AM
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.
11-21-2018 09:22 AM
@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.
11-21-2018 09:43 AM
Let us see the code with sample data. You have almost certainly written yourself a race condition
11-21-2018 12:59 PM - edited 11-21-2018 01:00 PM
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. ;))