Showing results for 
Search instead for 
Did you mean: 

unbundle array

Go to solution

I have an array of clusters.  I am trying to programmatically change a value in an array of clusters.  I have a lot of applications for this but wanted to give an easy example to see why this isn't working and if maybe there is an easier way to do this.  This is just a boolean value that once turned true then turns false after recording a numeric value of which index this happened on.



0 Kudos
Message 1 of 8
Accepted by topic author Trinity32244
05-21-2019 11:28 AM


3 simple steps to make this easier:

1. get rid of the local variables. Replace them with a shift register on your for-loop.

2. Have a look at Implace structures

3. Have a look at the difference between the count terminal (N) and the iteration terminal (i)

ʍolɟɐʇɐp ʞuıɥʇ
Message 2 of 8

And one step that makes this easier for (some of) us:  Never attach a JPEG.  Rarely attach a PNG.  Always attach a VI (which we can open, edit, run, change, etc.).


Bob Schor

0 Kudos
Message 3 of 8

A picture is worth a thousand words, but a VI is worth a thousand pictures.

(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 4 of 8

@billko wrote:

A picture is worth a thousand words, but a VI is worth a thousand pictures.

Now THAT is a situation where the stacked sequence was overused.



Message 5 of 8

I appreciate the suggestions and seems like I got it working.  Not 100% of how the in place structure really helps when I looked at how I first did it and then trying to use in place structure.  I am guessing from what I read that the replace array subset may create an entire copy of the array in memory and this way does not.  Thanks for the help

0 Kudos
Message 6 of 8

You still can get rid of those locals AND the huge sequence structure by using wires instead. Is there a reason why you read the value of bool3? you could just set it to FALSE even if it already is..

ʍolɟɐʇɐp ʞuıɥʇ
Message 7 of 8

@crabman -- love the signature!  


Bob Schor

0 Kudos
Message 8 of 8