ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

run

Dear forum members. I have a question.
How can I keep the previous data everytime. For example: after 1st run I have 1data, after 2nd run need 2nd data+1st data, after 3rd run 3data+2data+1data and etc..
I attach the Vi. Please help me.
 
Thanks in advise.
Sincerely
Harutyun Melikyan!
0 Kudos
Message 1 of 4
(2,944 Views)
That would be called an array of data. For best performance and if you know a priori the size of the array, allocate it with "Initialize Array" outside the while loop and use "Replace Array Subset" in your event. Otherwise, you can use "Build Array" and a functional global.

I also read your post as perhaps meaning ADDING the previous results to the current results. In that case, you could wire your current result to a shift register on the while loop.

Message Edited by Bill@NGC on 08-19-2007 07:04 PM

Message 2 of 4
(2,944 Views)

Excuse me, can you attach the simple example?

My problem is: everytime need to keep all previous datas.

Thanks a lot.

Sincerely

Harutyun Melikyan.

0 Kudos
Message 3 of 4
(2,931 Views)
The quick modification shows both possibilities.
Message 4 of 4
(2,926 Views)