LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

clearing XY graph

Hi fnds,

I am facing a problem in clearing the previous value of XY graph before starting a new execution. I went through NI forums & blogs & fed my X & Y value to express XY graph along with reseting its value from one of its input. But still the same output remains, not able to clear previous value. any suggestion please.

0 Kudos
Message 1 of 5
(1,478 Views)

reshmi.0989@gmail.com wrote:

Hi fnds,

I am facing a problem in clearing the previous value of XY graph before starting a new execution. I went through NI forums & blogs & fed my X & Y value to express XY graph along with reseting its value from one of its input. But still the same output remains, not able to clear previous value. any suggestion please.


It is not really clear what you try to do. You should show (attach!) your VI what you tried so far. Keep in mind, an XY Graph always shows what you connect to it. If you want to clear a Graph, you need to connect empty data arrays to it.

Maybe you want to use a Chart instead of a Graph? A chart has a history, it keeps previous data points, but of course you can also clear charts. 

An XY Graph is often used alongside with a shift register: you can keep those data point value pairs in memory which you need to plot at iterations, and you can also manipulate these array as needed.

 

Anyway, show us what you have, and explain clear what you want.

0 Kudos
Message 2 of 5
(1,457 Views)
Hi reshmi, Use invoke node of XY graph reinitialize to default value
Venugopal
0 Kudos
Message 3 of 5
(1,436 Views)

Here is what I like to do. Treat your graph like an Action Engine http://forums.ni.com/t5/LabVIEW/Community-Nugget-4-08-2007-Action-Engines/m-p/503801  and have an initialize case so you can clear the graph when necessary. 

 

 This is a sub-vi to a larger program that is monitoring a grid tie inverter, this one graphs "solar harvest"  

 

SOL2.PNG

At midnight I do an "initilize" to clear the graph and setup the X-axis for the next day.

SOL1.PNG

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 4 of 5
(1,405 Views)

If you use the "build xy graph" express VI, make sure it is not set to retain data between calls. In that case, the data accumulates inside the express VI. 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 5 of 5
(1,381 Views)