LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to refresh XY graph

I am trying to clear data shown on a XY graph every day while data keeps coming from DAQ board. I tried to erase an array connected to the XY graph, but it did not work.(I can still see older data)
0 Kudos
Message 1 of 20
(16,466 Views)
you're halfway there..
create > invoke node
method > reinit to default
put it in a case
Message 2 of 20
(16,465 Views)
I did,
application control>>invoke node
select VI server class>>VI
method>>reinitialize all to default

but then what do i do?
-I do not know what to wire where.
-I do not reinitialize everything. I only want to do it for a XY graph.
0 Kudos
Message 3 of 20
(16,465 Views)
not app control - cant you do:

right click on XY Graph > create > Invoke Node

right click on Invoke Node>methods>Reinit to default

then you dont have to wire anything - just put it in a case

I havent used this before... but also wondering why your array is still plotting the graph if it is empty - you should be getting a plot of an empty array anyway (nothing)...

maybe you can post your VI in 6.0 format we can see what is happening
0 Kudos
Message 4 of 20
(16,465 Views)
Thanks a lot.

it works but i can't take your way in my program, cuz i need to clear an array as well as the graphs unless XY graph can keep older data while receiving new data.

I am uploading my program for you.
0 Kudos
Message 5 of 20
(16,465 Views)
Can you explain a little more about what is happening? XY graphs don't have any sort of memory so I don't understand what is happening. The attached VI shows that an XY graph simply plots what you send to it each time, it can't "remember" anything. To clear it simply write an empty graph to it. This VI clears the graph when you press the button, or every 100 updates.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 20
(16,465 Views)
I can't look at it unless you save to 6.0 format:

File>>save with options>>save for previous

can probably get an idea even if you get some errors on saving if you get a dialog saying some parts cant be converted - post the vi anyway

also, like Mike says...

Paul
0 Kudos
Message 7 of 20
(16,465 Views)
Hello. I have the same problem and that invoke node doesnt help me.
I have an I/O card on my computer. From this I want to log to voltage values that are dependent on each other in a XY graph(just like y=f(x)=2x). I want to se the signals in a graph when the iterations in the "for loop" are done. Then I want to log the two values in an XL document. Here`s the problem occur. I cant clear the older data from the graph. It just adds up. Let`s say i have chosen 20 iterations, i can read in the xl document and the se in the graph that there are 40,60 80 iterations and so on.

I want the program to operate like this:
1. I press start button and the program logs the two voltage channels in. These values should then appear in the xy graph.
2. The same values should then be plotted to an xl document by an "write to measurement file".
3. When I press start agian, the old values will be reset and I will have a new graph that doesnt show the old values. This also for the xl document.

Can anyone please upload an .vi that can show me how this is done. I want to use the DAQ assistants, and write to measurement file .vi`s.

I use Labview 8.0

Thanx
0 Kudos
Message 8 of 20
(16,234 Views)
Hello,

To clear the XY graph you can simply wire an empty graph (bundle 2 empty arrays together) to it as Mike has shown in the example above (for instance, in that example when you click on the OK button the graph is cleared).

If you could post your VI it would be easier to see where the problem is occurring as well.

Thank you and good luck with your application!
Shakhina P.
Applications Engineer
National Instruments
0 Kudos
Message 9 of 20
(16,209 Views)

The x and y arrays of your graphs are built up in a shift register.

To clear, just feed it an empty array as in the attached image of your modified code (sorry, I no longer have LabVIEW 6.0).

 

Message Edited by altenbach on 03-29-200604:10 PM

0 Kudos
Message 10 of 20
(16,201 Views)