06-25-2014 09:00 AM
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
Solved! Go to Solution.
06-25-2014 09:06 AM
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...
06-25-2014 09:12 AM - edited 06-25-2014 09:17 AM
Hi Mike,
Ok, found the threshold .vi. Thanks.
Nevica
06-25-2014 09:17 AM
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.
06-25-2014 09:22 AM
You can use Threshold 1D Array. See attachement.
06-25-2014 09:26 AM
Hi Paul,
Thanks, that solved my problem. How did you create the traffic lights on the front panel please?
Daniel
06-25-2014 09:59 AM - edited 06-25-2014 10:00 AM
@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