LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Merging Signals From Case Structure

Solved!
Go to solution

Hello,
I am making a scanning program which requires several cases to be evaluated within two for loops. I've hooked up both conditions in a while loop, and I know that because of the conditions only one of the wires will be executed. In two of them I modify a parameter and one I leave it alone, but I am unsure of how to connect the three to the module on the right. Any tips?

Thanks for your help,

gordonj005

0 Kudos
Message 1 of 6
(2,745 Views)

0 Kudos
Message 2 of 6
(2,744 Views)

Build your conditions into an array.  Use "Search 1D array" to find which condition is T.  Wire the output of "Search 1D array to a single case structure which contains the code:

 

select condition.png

Note that the 3 case structures I show are not 3 separate case structures, like you have.  They are different cases of one single case structure.

 

Hope that helps.

Message 3 of 6
(2,735 Views)

Thanks! This looks great, however when I try setting it up there is only two case structures indexed. Why is that?

0 Kudos
Message 4 of 6
(2,729 Views)
Solution
Accepted by gordonj005

When you drop a new case structure onto the block diagram, LabVIEW creates a structure with two cases by default.

 

To add additional cases, right-click on the case structure and select "Add case".  You can either "Add case after" or "Add case before".

 

You can learn a lot by experimenting, right-clicking on things and examining your options, and using the LabVIEW help.  Since it seems that you're pretty new at this (not knowing how to create additional cases was the clue-in), I'm trying to give you some tools for learning on your own.  I'm not trying to be mean.  Smiley Happy

Message 5 of 6
(2,726 Views)

Ahh excellent, thanks so much. You guessed right, I've only had about a week's experience with LabVIEW, thanks for the tips 🙂

0 Kudos
Message 6 of 6
(2,709 Views)