LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I delete pages of a 3D array, based on conditions in two of the columns

Solved!
Go to solution

Because you have the two indicators outside of that case structure wired to tunnels where they have use Default if Unwired.  So if one case runs, one indicator gets the values from the feedback node, the other indicators gets the default data of an empty array.  And vice versa if the other case runs.

 

I'm sure there is an easier way to loop through your array and do all of the comparisons.  But at a minimum, I would clean up the code and create a subVI for those few functions where you do the string subset, comparison with constants, and AND'ing them together.  That subVI would be used 10 times in that first while loop.

Message Edited by Ravens Fan on 04-05-2010 11:46 AM
Message 11 of 15
(558 Views)

Any hints on how to fix it? I tried moving the indicator inside the case structure and that works, but then I'm not sure how to get the data out of the loop.

0 Kudos
Message 12 of 15
(555 Views)
I tried a local variable and that works..but is there a better way?
0 Kudos
Message 13 of 15
(553 Views)
Solution
Accepted by topic author chuck72352

Move the feedback nodes out of the case structure so that the feedback node is available no matter which case is run.  Use the Build array in one case for the one array, for the other array, just wire it through so that it feeds back to the feedback node.  For the other case swap the BuildArray and the straight through wire.  The straight through wire will make the current values of the arrays available without changing what is in them.

 

(I myself would use shift registers in this case where the shift registers are on the outer For loop as it would make cleaner wiring.) 

Message 14 of 15
(552 Views)
Thank you!
0 Kudos
Message 15 of 15
(550 Views)