From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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,137 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,134 Views)

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

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

I was missing one...

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