LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array / Clusters retaining information

Hi,

 

I had created a VI earlier using extremely unpopular programming techniques (overuse of local variables etc). Using this forum, I managed to redo it using producer/consumer loop, queues, clusters etc.

I have one problem though.- My grpahs seem to retain values from last time the VI was run. I think this is the case, because if I quit the VI adn restart again, there is no such issue.

But if I just stop the VI and re run it, the previsou data seems to be there.

 

2.JPG1.JPG

 

The image on the left is the normal running. The one on the right shows that the graph is plotting peaks of the current signal but the signal on display is the previously acquired signal. The VI is behaving unexpectedly and runs normally if I close it each time.

 

I have on idea what is causing it. I am sure it is something straight forward, can someone point out please.

 

 

VI attached.

 

 

Thanks,

Jas

 

 

 

0 Kudos
Message 1 of 9
(3,381 Views)

Are you using a chart?  Charts have memory.  If you are using a chart, try clearing its memory before entering your main program loop.

 

Clear history from Waveform Chart.png

0 Kudos
Message 2 of 9
(3,358 Views)
Bah, Stupid Snippets!  That reference control is suppose to be a reference constant pointing to the Waveform Chart.
0 Kudos
Message 3 of 9
(3,357 Views)
I don't have LabVIEW on this machine so I can't look at your code. Do you have a unitialized shift register that is holding that waveform data?
Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 4 of 9
(3,334 Views)

Yes, I have uninitialised shift registers holding the data.

It is as follows, would you suggest changing this

untitled.JPG

0 Kudos
Message 5 of 9
(3,304 Views)

How bad!!

Sorry, they are intialised to a constant 0, I was thinking more like initilaising in terms of specifying array size and element values. Also. when plotting the graph, I am only sending teh daq values to the xy chart and plotting the peak locations and amplitudes on the same chart. The chart seems to remember the previous waveform / data but plots the current peaks

0 Kudos
Message 6 of 9
(3,302 Views)

Damn!! Gotcha!

 

It was the feedback node in the plot. Can't believe I did it.

untitled.JPG

 

 

That raises a question- How shall I rememer the data from one iteration to the other so that I can plot it on the graph. As mentioned above, charts remember data but I cannot plot peaks (x,y) on charts.

Any ideas please?

Message Edited by Jaspal on 10-19-2009 10:36 AM
0 Kudos
Message 7 of 9
(3,300 Views)
Any ideas for the above question anyone?
0 Kudos
Message 8 of 9
(3,267 Views)

Nickerbocker wrote:
Bah, Stupid Snippets! 

See here. Smiley Happy

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 9 of 9
(3,257 Views)