12-05-2012 02:42 PM - edited 12-05-2012 02:43 PM
Hi,
I currently have a problem that I have build a program using the state machine architecture and now I want to add a value to an array every time a button is pressed, but I wish the array to add the new value rather than deleting the last value. I can't seem to figure out how to make this work without using the while loops and similar. It doesn't seem to work properly.
It is in the measurement Case.
The idea is I draw multiple lines and then it saves the length of the lines in an array and then I take an average of this so I can convert pixels to real life SI units. But right now I can't seem to add the information into the array.
There are quite a few Sub Vis but I think they shouldn't be important for this question thanks!
Solved! Go to Solution.
12-05-2012 03:01 PM
What's wrong with just using Build Array?
12-05-2012 03:45 PM
Also with build array the same thing happens, it enters the first value but when I run the event again it overwrites the entry already in the array rather than appending it to a new array field.
any ideas?
12-06-2012 04:45 AM
hi
could you post the code in LV 2010?
are you clearing the array in any of the other cases? or are you deleting some elements from the array in other cases? i have not seen the code so cant think of any other options.
i am not sure if you have a 'use default if unwired' option enabled on this wire coming out of the event structure
12-06-2012 12:43 PM
HI thanks for your reply, I actually have managed to figure out the problem, or rather I must have previously missed something hence why it didn't work. Thanks for all the help guys!