Example Program Drafts

Showing results for 
Search instead for 
Did you mean: 

Nesting Case Structures

by Member Margaret F. on ‎02-17-2009 11:47 AM

The attached file exemplifies how to use case structures within case structures to access different ranges of input. In the example, the use enters a number and is told which of three ranges that number falls into. This example shows how to implement and If...then...else statement into LabVIEW.

case structure.png

It is also worth mentioning here that if you are using a datatype that the selector terminal for the case structure accepts (integer, Boolean value, string, or enumerated type), you can implement this behavior with the case structure directly:

Nesting Case Structures Edit.jpg

You can specify comma seperated values for lists, and both bounded and open-ended numeric ranges as shown above. See the LabVIEW help for Case Structures for more details.

Comments
Member Todd S.
Member

Please add "LabVIEW" to the tag field so it shows up on the main page.