07-17-2013 06:22 PM
This is a snippet of code that I am using in a larger program, but the functionality remains the same. I'm reading two waveforms from an oscilloscope and want to insert them into my Data cluster that gets passed globally. For some reason, when I do the insert into array, no data ever makes it into that array. What concept am I missing here and what do I need to fix it?
Solved! Go to Solution.
07-17-2013 07:27 PM
I think I may have stumbled across a solution. I replaced the Insert into array with a Build Array, and then right-clicked and chose the concatenate option. Is this the preferred solution? Can anybody explain to me why my original solution didn't work?
07-17-2013 08:15 PM
Build Array is the correct way about 99.9% of that time.
I don't think I've ever actually used insert into array. It is intended for those situations where you want to Insert and element into the middle of an array, not when you want to Build on to the array at the beginning or end.
Your original mode didn't work because you wired the value of the N terminal into the index of insert into array. That value is 3. If the array coming into the loop is empty, then you can't insert an element at index 3 because the rest of the array before that doesn't exist.
07-18-2013 10:08 AM
That makes sense, thank you!