07-31-2014 03:07 PM
Hello, I'm trying to continuously add data to a pre-initialized array using a timed loop. The goal is to have a new row of data added during each iteration of the loop, with the previously indexed data remaining. Currently my code resets the array (all zeros) and only includes the currently indexed row. The "write to spreadsheet" VI is also a test for writing the array to text, but I was able to get that to work.
For example, I want the array to look like this:
0 x y
1 x y
2 x y
3 x y
and so on. Currently it will read out:
0 x y
0 0 0
0 0 0
0 0 0
then
0 0 0
1 x y
0 0 0
0 0 0.
-Josh
07-31-2014 03:14 PM
I don't see anything in that VI about adding to an array.
Hint: Look into Shift Registers if you want to append to an array within a loop.
07-31-2014 03:22 PM
You are looking for shift registers. You need a way to pass the array data from one loop iteration to the next.
http://www.ni.com/gettingstarted/labviewbasics/shiftregisters.htm
07-31-2014 06:56 PM
Shift register, as has already been mentioned, and Replace Array Subset.
Lynn