LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case Structures

In Labview 5.1, how do I make the Case Structure accept a new case
that I put in. For example, if I want to put in 0 as another case,
Labview would highlight the case in red and put it in between quotes,
like so, "0"(red not included). How would I make Labview accept my
new case?


Thanks

Muhammad Asfour
0 Kudos
Message 1 of 3
(2,851 Views)
It is coming up red because 0 is invalid for that type of case structure. Case structures are boolean type by default when you place them on your diagram (TRUE and FALSE are the only valid values). After you place the structure wire a numeric terminal or constant to its conditional input to change it to a numeric type case structure. Then you can add cases for whatever numeric value you want (0 is one of the default case values).

Hope this helps!
Brian
0 Kudos
Message 2 of 3
(2,851 Views)
Muhammad,

If you start out with a blank sheet and place a case structure, it defaults
to a boolean structure with cases True and False. If you then add a case and
put in a zero, the 0 will be put in quotes and made red to show that the
added case (0) is not of the same type as the original cases. If you wire a
numeric (like a constant 0 or a numeric control) to the case control (the
"?" on the left) you will see the "0" in red goes to 0 in black indicating
that the case structure is now of type numeric and it is happy with your
case 0. You will also notice that the original two cases, True and False,
are now quoted and in red, indicating that they are not of the same type as
the (now numeric) case structure.

Bottom line, place the case structure, decide what typ
e of case structure
you want, wire a control of that type to the "?" of the case structure, then
add cases.

Hope this helps.

Jim


"Muhammad Asfour" wrote in message
news:1f6c2cce.0206040911.3a72c273@posting.google.com...
> In Labview 5.1, how do I make the Case Structure accept a new case
> that I put in. For example, if I want to put in 0 as another case,
> Labview would highlight the case in red and put it in between quotes,
> like so, "0"(red not included). How would I make Labview accept my
> new case?
>
>
> Thanks
>
> Muhammad Asfour
0 Kudos
Message 3 of 3
(2,851 Views)