LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Replace build array with replace subset array

    Currently I am using a build array function, but would like to replace it with a replace array subset, but I am new to labview and having a lot of trouble.  I've attached a screen shot of the code I am struggling with.  Does anyone have any ideas?
0 Kudos
Message 1 of 3
(2,686 Views)
It appears to me that there should be a While Loop inside the case structure. Then, right click the left margin to add a Shift Register. The data that comes out the right margin shift register magically appears on the next iteration of the While Loop at the left margin Shift Register. Each iteration will build more onto your output, via the Build Array function.
0 Kudos
Message 2 of 3
(2,668 Views)

First, I'm assuming this is inside some sort of loop.  Second, I would recommend cleaning up the code a bit so the feedback node is not overhanging the edge of the case structure.  It's unclear as to what is wired to what.  Third,  I would recommend using shift registers instead of the feedback node.

Fourth, and the main thing is that you are currently initializing a 64 element 1-D array and appending it to your array on every iteration with the build array.

If you want to use the replace array subset.  Initialize the array to the size you want outside of the loop.   Feed it into the left hand shift register.  Replace each row (or column) with your new data.  You will need to track the iterations, and possibly add special code to shift the array, or enlarge the array in the event you have more data come in then the original size of your array.

0 Kudos
Message 3 of 3
(2,667 Views)