LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Old data on X-Y Graphs

Solved!
Go to solution

Hello,
  I'm having some trouble with getting old data on my x-y graph.  When I run the program to collect data, it is collected, and the program stops.  When I run the program again to collect new data, the new data seems to append onto the old data in the plots I'm generating.  The problem can be seen in the attachment for both plots I'm trying to do (note the straight line going from the end of the first data set to the beginning of the new data set in the plots).  If I close and re-open LabView after each data acquision there is no old data, but I would rather not have to do that if possible. 

 

I have tried the following things to try to fix it, with none of them solving the problem:
- Set the VI Properties to clear all indicators at execution
- Wire an empty array to the value property node of the graph at the beginning and end of the program
- Wire an empty array to a local variable of the graph at beginning and end of the program
- Right clicking the graphs and selecting "Clear Graph" after data acquisition
- Right clicking the graphs and selecting "Reinitialize to Default Value" after data acqusition.

I was wondering if someone could help me with this problem, if you need more information, just let me know.  By the way, I'm running LabView 8.0

Thank you

0 Kudos
Message 1 of 4
(2,961 Views)
Solution
Accepted by topic author hink4769

A screenshot of the front panel doesn't tell us much.  Perhaps you could attach the VI? Smiley Wink

 

I would guess you have an uninitialized shift register that you are appending new data points to.  When the shift register is not initialized before the loop starts, it will maintain the data that is present in it from previous runs of the VI since the VI has been open.

Message 2 of 4
(2,958 Views)

I agree with Ravens that you probably have leftover data in uninitialized shift registers or feedback nodes.

 

A picture of the front panel is useless, why don't you show us a picture of the block diagram?

 

Best would be to correctly code around it, e.g. initialize the shift registers with empty arrays.


hink4769 wrote:

If I close and re-open LabView after each data acquision there is no old data, but I would rather not have to do that if possible. 


 

 A simpler way to clear data contained in shift registers is a simple "file...revert..." on the VI. Much faster than reloading LabVIEW. 🙂

(Of course it requres a minor edit change, e.g moving of a diagram constant by a few pixels, which of course will be undone immediately by the revert operations.)

Message 3 of 4
(2,942 Views)

That was the problem, I did not initialize the system registers.  Thank you.

0 Kudos
Message 4 of 4
(2,937 Views)