LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

xy graph clear data of previous plot

Hi,

 

I've a program running on labview that perform hardaware control on a DSA (dynamic signal analyzer) to do spectrum acquisation over a range of frequency. My program currently works fine, I've my data acquire from the DSA and displayed in the xy graph in the front panel. I'm using a loop to perform iteration for data acquisation at different frequency decades, and shift register to store those data at each iteration, in order to have a final plot in the XY graph with the full range of frequency measured. The problem I'm facing is in the display of XY graph, it seems that in the front panel when I right click the mouse and select data operation->clear graph, it only clear the data displayed on the plot from the front panel, but not the ones in my block diagram, therefore when a run another measurement let says with less frequency range, the xy graph plot in front panel overlapped data from the previous measurement and current measurement. Is there a way to clean the previous data, see attach in picture portion of block diagram and front panel.

Download All
0 Kudos
Message 1 of 5
(2,840 Views)

Is is difficult to debug an image of your code where a lot of it is cut off.  I can't even see the while loop in your image.

 

Despite that, I'm going to guess that your problem is caused by uninitialized shift registers where you are maintaining your arrays of data.

0 Kudos
Message 2 of 5
(2,831 Views)

Do you mean, that every time that I ran my labview I have to re-initialize my shift register ?

0 Kudos
Message 3 of 5
(2,783 Views)

The start of your measurement sequence should always initialize the shift registers to clear them of any left-over data. 

0 Kudos
Message 4 of 5
(2,773 Views)

@er_10_1999 wrote:

Do you mean, that every time that I ran my labview I have to re-initialize my shift register ?


Yes, if you don't want the data from the last time you ran the VI to be left in the shift register.

If you do want the data from the previous run of the VI such as when you are creating a functional global variable or Action Engine, then you do not want to initialize the shift register.

0 Kudos
Message 5 of 5
(2,758 Views)