LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My array keeps zeroing out already entered data

I have a vi that takes two values and reads them into an array.  It then uses a shift register to go back and get two more values.  When the vi inserts these two new values into the array, it zeros the original two values, even though I am inserting them at the next two index values.

 

0 Kudos
Message 1 of 4
(2,334 Views)
It would help if you posted your VI, or an image of the code where the problem is occurring.
Message Edited by Matthew Kelton on 12-29-2008 05:44 PM
0 Kudos
Message 2 of 4
(2,327 Views)

Matthew,

Thanks for replying.  Believe it or not, I finally solved it last night.  I put the initializing sub vi inside a case structure to read the first two values instead of outside the for loop.  The next pass throught the data used the next case structure with a 'insert array' and everything works fine.  I can't believe it took me so long to solve this one, but it really feels great when you get it on your own.

Ron

0 Kudos
Message 3 of 4
(2,292 Views)
You should anyway post your code to be reviewed by some experienced LabVIEW programmer : the way you explain your findings leaves some suspicions on the quality of the solution... 😉
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
Message 4 of 4
(2,289 Views)