LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Outputs of case structure? How to limit?

I have an application where I am running a case structure controlled by a comparison and resides within a while loop. When the case is true, it loads a file into an array that I have outside the while loop. The problem is, when the case is false, I don't want it to do anything. But, the case output needs to be wired for both cases. Is there a way around this using a different method?

-Sue Kristoff
0 Kudos
Message 1 of 3
(2,219 Views)
On the while loop, create a shift register. Take the array output from the case structure and wire it to the shift register element on the right side of the while loop. From the left side element, wire it into the case structure and in the false case, just wire it straight through. I've attached an example. It could also be done with a local variable but in this situation, there's no reason to use one.
0 Kudos
Message 2 of 3
(2,219 Views)
Thanks for the input, it has worked. I realize after I read your response that I mistyped, I actually used a for loop, not a while loop, but the same concept works. I then put a Build Array function into the case structure so that each loaded file would get added to the array, so I end up with a 3D array, with each "sheet" being one file.

FYI, I am writing a subvi to load files based on a users date input. The 3D array will then be used in the analysis portion of the rest of the program.

-Sue K.
0 Kudos
Message 3 of 3
(2,219 Views)