LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Dial to control case structure

Create a dial control that goes from 0 to 2, with 3 LED displays:  one green, one yellow and one red.  Have the VI turn the LED green when the dial is on 0, yellow when the dial is on 1 and red when the dial is on 2. 

 

I have a case structure with numbers 0,1,2, each with an led. I'm getting an error and thinking it is maybe because I am using the dial as a control? I feel as if this should be a straightforward VI to make but am fairly new to Labview. Thanks!

ebf11_0-1613944817218.png

 

 

0 Kudos
Message 1 of 3
(1,524 Views)

You dial control can have an almost unlimited number of possible values. Make sure that you have a default case that executes when a value occurs that is not mentioned.

 

This looks like homework, so here are some tips:

 

  • There is a =0 primitive, but you don't even need it because once this case occurs, the value is guaranteed to be zero, right?
  • The LED indicator terminals belong after the case structure, else it will not turn off when another case occurs.
  • Think of a simpler solution that does not even need a case structure. There are many better alternatives!
  • (For example, the three LEDs could be a radio button indicator, now you can just wire the dial to it and the rest will fall into place.)
  • You probably need a top-level loop and appropriate wait.
  • Notice the red coercion dot? It means your two integers are of different type. Figure out why!
  • Start with some basic tutorials or at least look at your class notes.
  • ...

 

 

0 Kudos
Message 2 of 3
(1,494 Views)

Appreciate the feedback and will definitely do some tutorials. There sadly has not been any class notes to look at 😞

0 Kudos
Message 3 of 3
(1,478 Views)