LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

output file problem

Hi.


I have a problem with data output using "Write to Spread Sheet File" VI. I attached a little VI so that I can tell what my problem is. Basically I want to putput 1-D array of data generated by the random number generator VI, which is located in the while loop. But, with the current VI I attached, I can output only the last number when I press the stop button. How I can save the all data as a 1-D array during the VI run?


Airo
0 Kudos
Message 1 of 2
(2,540 Views)
You're only creating an array with a single element in it - the last number generated in the while loop. You should right click on the output tunnel where it exits the while loop and select Enabel Indexing. That way, the while loop will automatically build an array with each result of the random number generator (it will work just like the default behavior of a For Loop). Another way to build an array inside a while loop is with a shift register and a Build Array function but the autoindexing method is the cleanest.
Message 2 of 2
(2,540 Views)