02-12-2008 09:29 AM
02-12-2008 09:34 AM
02-12-2008 09:43 AM
Shift registers are the way to go, you might use a functional global with the shift registers in that if you are worring about keeping the code clean (this avoids the wiring pass through wires in unused casesof a case structure and can have all shift registers in one subvi and not exposed in the main vi). I have asked for a concatinating autoindexer in the past (as well as a conditional one) but none have been added. How big is the data set you are building?
Paul
02-12-2008 10:10 AM - edited 02-12-2008 10:11 AM
First of all, your "complicated" solution is overly complicated, you only need one "concatenate array", not two. 🙂
Another possibility is a feedback node. Since you are using a recent labview version, you can move the initializer terminal to the outermost loop (not available in older versions).
In any case, you are really thrashing the memory with constant reallocations. It might be more efficient to preallocate a "worst case scenario" sized array, replace elements as you go, and trim at the end to the final size.
02-12-2008 10:48 AM
Thanks for the answers!
OK, I need only one "concatenate array", that helps a lot! and the version with the feedback node looks very easy.
The inner loop in my applications runs between 299 and 301 times and the output is 27 arrays with results that needs to be collected correct without extra zeroes and the outer loop runs 10 times.