LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case selector and traffic lights

Solved!
Go to solution

Hello,

 

Need some help with some code.

 

I want to be able to indicate on the front panel with a traffic light system the stability of a light source.

 

The stability can be defined as:

 

1. Not stable -                              value = 0.3 - 2

2. Partially Stable -                      value = 0.001 - 0.3

3. Stable -                                     value = 0.000001 - 0.001

 

Is there a way of using an 'index array' to carry this out instead of a state machine to carry this out.

 

Nevica

0 Kudos
Message 1 of 7
(2,640 Views)

You could populate a numeric array with the threshold values for the three ranges, and use the built-in threshold VI to find out where your input value falls in the range.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 7
(2,633 Views)

Hi Mike,

 

Ok, found the threshold .vi. Thanks.

 

Nevica

0 Kudos
Message 3 of 7
(2,625 Views)

Array palette, 3rd row, 2nd one in. Try out the palette search function, it is a great help.

 

And yes a numeric array in ascending order numerically. Also don't forget to include as your first element in the array a 0. 


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 7
(2,616 Views)
Solution
Accepted by topic author nevica

You can use Threshold 1D Array.  See attachement.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 5 of 7
(2,613 Views)

Hi Paul,

 

Thanks, that solved my problem. How did you create the traffic lights on the front panel please?

 

Daniel

 

 

0 Kudos
Message 6 of 7
(2,609 Views)

@nevica wrote:

Hi Paul,

 

Thanks, that solved my problem. How did you create the traffic lights on the front panel please?

 

Daniel

 

 



its a "radio buttons" replaced by round leds and color properties changed for on/off of each individual one  Smiley Wink

0 Kudos
Message 7 of 7
(2,589 Views)