LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you set a graph to it's default value programmatically?

I have a waveform graph (control on the panel). I'd like to set it back to it's default value through a property node (or something). Is there a way to do this?
0 Kudos
Message 1 of 9
(4,174 Views)
You can create a reference to the control and wire that to an Invoke Node and use the method Reinit to Dflt. If all you want to do is clear the data, then wire an empty array to a local variable or a value property node. There's a shipping example called How to Clear Charts & Graphs that shows how this is done.
Message 2 of 9
(4,174 Views)

This method of sending an empty array seems fine for when you are bulding charts/graphs using arrays.... but what do you do using a graph that is accepting dynamic data?

You cannot create a constant of dynamic data to send to the local variable.

Should I send an empty array to the history value in the property node?

 

EDIT: Nevermind... can't do that either... History data is also dynamic data... which makes sense...Smiley Mad ... so how do I do this?

I'd rather not write in timer code and make an array of timing values to build a graph the old fashioned way. Smiley Happy

Message Edited by MJBrehm on 06-07-2006 11:13 AM

Message Edited by MJBrehm on 06-07-2006 11:15 AM

0 Kudos
Message 3 of 9
(4,069 Views)


@MJBrehm wrote:

You cannot create a constant of dynamic data to send to the local variable.


But you can convert an emtpy array to dynamic data before wiring it up. 🙂

(And if you just create a diagram constant of an empty array and wire it to the node, LabVIEW will insert the conversion for you automatically :D)

Message 4 of 9
(4,054 Views)
Maybe my graph isnt setup properly or something then... because the only thing wiring an empty set to the graph does, is insert a zero into the graph...  maybe thats because I was sending an empty array to the local variable and not the history. Hmm, brb.
0 Kudos
Message 5 of 9
(4,049 Views)
hmmm...
 
I need that graph to clear before the start of that while loop... thought maybe the pic would help.

Message Edited by MJBrehm on 06-07-2006 12:23 PM

Download All
0 Kudos
Message 6 of 9
(4,046 Views)
this is why i don't like to ( and like to) ask questions... i seem to figure it out ONLY after I ask them.

Message Edited by MJBrehm on 06-07-2006 12:33 PM

0 Kudos
Message 7 of 9
(4,037 Views)
Woah slow down, you've given us 14 minutes to react. I'm not sure but has a graph not a 'reinitialize to default' method?
And out of curiosity, what is the advantage of dynamic data over doubles/waveforms/....? I am totaly NOT familiar with them but if you can be the devils advocate it would be nice.

Success,

Ton

(and yep we're all our Own worst Enemy)

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 8 of 9
(4,020 Views)
Yea, I kept answering my own questions there, sometimes I just like to talk through it, it seems when I ask the question, it clears my mind of some clutter. Wasn't expecting a response in 14 minutes... don't wanna give ya that idea.. Smiley Sad ... it was more of me just talking myself through it.

As for the benefit of dynamic data? I really don't know. It's probably something I should look into considering I use it often. I'm working off 2 months labview experience, so I'm still learning.

Didn't try the 'reinitialize method' but I'm sure that may work too. Maybe I could try that tomorrow.


0 Kudos
Message 9 of 9
(4,017 Views)