LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why don't the values in an array get deleted after VI finishes?

Solved!
Go to solution

I am having a weird problem with my code. I have a 2D array that receives data over a serial connection from a microcontroller. My VI searches this array for a specific value and when that value is found, it moves on to another part of the code. The problem is that when I run the VI mulitple times without closing, the array's data does not get deleted so the value that causes the VI to move on is found immediately and the first part of the VI is skipped. 

 

Do I need to do something to ensure all data is cleared after a full run?

 

Thank you

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

Without seeing a VI, we can only guess.

 

My guess is that your code uses shift registers, and those shift registers are not initialized.

Message 2 of 4
(2,141 Views)

Here is the VI. I thought I had initialized them.

Download All
0 Kudos
Message 3 of 4
(2,138 Views)

I was missing one...

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