LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trivial Case structure question

Solved!
Go to solution

I am trying to use a string control with a case structure.

 

Depending on the string value, I want the VI to show some kind of an indicator on the front panel.

 

If the value is 00 i want it to show "Local"

If the value is 10 I want it to show "Off"

If the value is 12 I want it to show " Remote"

 

Sorry I'm new to LabVIEW and I can't quite wrap my head around this Smiley Sad

0 Kudos
Message 1 of 5
(2,507 Views)
Solution
Accepted by topic author mhaque

What is the input"  Is it a string containing "00" "10" or "12"?

 

And the output is a string with either "Local" "Off" or "Remote"?

 

Then your cases should be "00" "10" and "12".  In each case would be string constant with the respective words "Local" "Off" or "Remote" that wire out of the case structure through a tunnel to your string indicator.

 

Have you taken at the online LabVIEW tutorials?
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

0 Kudos
Message 2 of 5
(2,504 Views)

yes. Input/control = 00, 10 or 12

 

And depending on this value I want the VI to show "local", "off" or "Remote"

0 Kudos
Message 3 of 5
(2,495 Views)

Good.  I did interpret it the way you want.  So then you can follow the instructions in my reply.

0 Kudos
Message 4 of 5
(2,482 Views)

I would also take a look at the Combo Box, an effective means of mapping machine-friendly strings to human-friendly strings and vice versa.

 

In this case create a Combo Box, Edit Items, Uncheck Values Match Items, Make the Items Local, Off, Remote and the Values 00,10 and 12.  Change it to an indicator and voila.  Wire your string to the indicator and you get the desired display.

 

If you don't like the pull-down control on the indicator, it is quickly obliterated via customization.

 

0 Kudos
Message 5 of 5
(2,461 Views)