08-06-2013 04:40 PM - edited 08-06-2013 04:41 PM
Hi everyone,
I have code to pull a spectrum which is a 1D array from a USB connected instrument but I would like it to run the data collection many times and output the data each time to a 2D array that it builds over the run. I am showing my code below, I figured out how I can press a button "start acquisition 2" which will loop the data collection portion "times run". The problem is how to build the 2D array, If this was python or something I'd just initialize the array outside the loop and then just append the data each time but I can't quite get it to work that way here. I initialize the array with 0s outside the loop and carry the loop in but each time the while loop runs it pulls the blank array instead of continuing to build itself.
What is the preferred method of building an array for a method like this? I am using version 8.6 (I know a little old but I don't want to break the compatibility of the spectrometer)
Thanks so much!
Solved! Go to Solution.
08-06-2013 04:56 PM
The VI in case in helps, sorry for the broken modules!
08-06-2013 04:59 PM
Perhaps a First Call? and a Select node. Or case structure with a boolean that resets after the first loop:
08-06-2013 05:22 PM
This totally worked, thank you so much for your help!