LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Build array again while the VI is on

hey all,
 
I have a problem with reinitializing the array. I have simulated my actual problem in the VI which I am attaching. I want to record some values in an Excel Sheet, once the data acquisition is over. The VI remains ON even when data acquistion is stopped. Now when the data acquistion is started again, the array in which I store the values does not reinitialize inspite of my using the Property Node/Local Variable, etc, etc of the array. I want to rebuild the array from beginning once data acquistion resumes. The VI is ON throughout.  As my array does not reinitialize, Excel hangs up and does not record anythin. I am using Easy Excel Table.vi for recording in Excel.
     ALong is  attached the simulated version of the original application.
 
 
0 Kudos
Message 1 of 2
(2,498 Views)
There are several problems with your code. Let me mention 3 :
  • Missing data dependency ! Array and stop may not be initialized before entering the loop.
  • No need to initialize Array through a Value property node AND a local variable.
  • But the most important point : instead of initializing Array, you must initialize the shift register of the while loop. Delete the initialization of Array and connect and empty array to the shift register. Without this, the shift register keeps the previous values. On every new run, the new values are added to the previous. The number of elements in the array increases, increases... and at the end the system will crash because the RAM is full. Obviously, in this case, this will need a long time because of the 1s delay in the loop. But it is important that you understand the behaviour of an unititialized shift register.




Message Edité par JB le 03-13-2008 11:01 AM
Message 2 of 2
(2,487 Views)