03-21-2013 03:10 PM - edited 03-21-2013 03:10 PM
FOR loop to autoindex on the array of clusters. Unbundle the array in the cluster and use Build Array to add a -1 to the end. While adding on the -1, add the array to the building array.
03-21-2013 03:24 PM
Now you get a -1 as the very last element, not exactly the same as the original input, but probably close enough. 😄
03-21-2013 03:25 PM
@altenbach wrote:
Now you get a -1 as the very last element, not exactly the same as the original input, but probably close enough. 😄
That's your mistake. The OP had a -1 at the end of the original array.
03-21-2013 03:30 PM - edited 03-21-2013 03:31 PM
You're right, but I was talking about the actual snippet. If there is a guaranteed -1 as last element, my code can be further simplified, i think.... (we don't need the code after the loop, for example)
03-21-2013 04:06 PM - edited 03-21-2013 04:06 PM
If the last element is always -1, we can do the following (also assuming we have LabVIEW 2012 and concatenating output tunnels ;))
03-21-2013 07:10 PM
Thanks all for the code and explanation.