05-25-2012 11:10 AM
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
Solved! Go to Solution.
05-25-2012 11:11 AM - edited 05-25-2012 11:13 AM
05-25-2012 11:55 AM
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:
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.
05-25-2012 12:03 PM
Thanks! This looks great, however when I try setting it up there is only two case structures indexed. Why is that?
05-25-2012 12:16 PM
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.
05-25-2012 10:58 PM
Ahh excellent, thanks so much. You guessed right, I've only had about a week's experience with LabVIEW, thanks for the tips 🙂