LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing to array in case in while

I am currently trying to get a dataset written to a 1D array to be used as an output of a sub VI. The datapoints are sequential but do not always start at index 0. For this reason I want to specify the index that each value is being stored at.

 

Below is the case structure that is triggered when the measurement position is reached. This case structure sits inside a while loop that continously samples and tests if the position is appropriate to sample and recored the datapoint. This while loop is terminated when a set number of datapoints are read and also sits inside a flat sequence.
 The initialized array 1Dx721 sits in the previous flat sequence. Currently the array re-initializes and and the previous index written is overwritten. If i use a feedback loop inside the case structure things get slightly better but the array will end up being n-1 big from the initial index written.

 

 

Capture.JPG

0 Kudos
Message 1 of 2
(2,198 Views)

It would probably help if you just attached your actual VI.  I don't see enough context to figure out what you are trying to do and therefore can't really tell how to help.  But it is sounding like you really want a shift register to keep track of your array.  You should have the indicator terminal wired to the output of that shift register.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 2
(2,183 Views)