LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How... Case Structure Out-of-range value handler?

When I try to wire a [DBL] to the selector terminal in a case structure. The box selector display returns everything in quotes. I followed the examples in On-line help and in the books. How do you create an out of range value handler? Why does the case not accept the orange inputs, but will handle blue inputs just fine? I want to use a sequencer frame pass threw, from a previous frame to control this case structure. I want a value from 0-15. It originates from a math function in the prior seqence frame. It leaves as Orange. Do I need to convert it to something else before it leaves the first sequence structure?

In examples...it shoes a Boxed DBL with the case structure showing 0 [0..2] but when I put tha
t in using "A" Tool...it comes back at me in Red.

What part do I not get here?
0 Kudos
Message 1 of 2
(2,616 Views)
The basic way the case structure works is that if it finds a frame value that matches the input value it executes the code in that frame. If it can't find a matching value, it executes the code in the frame defined as "Default".

In general, it's not a good idea to try to control a case structure with a floating point value. In anycase, when you wire a float to the selector on a case structure it gets coerced to an integer. In terms of the quotes, that's probibly related to something you had the selector before the float. You don't have to leave it the way it is. Just select the existing label (including the quotes) and type in a number.

Also, you can define ranges:

Range Selector Value
greater than 9 9..
less than 8
..8
between 7 and 10 7..10
just 6, 8 and 10 6,8,10
any value not specified Default

Don't know why the example you cited doesn't work. You aren't putting in the square brackets are you?

hope this helps...
Mike
mporter@arielcorp.com

If you want, you can email me your code and I'll look at it for you...

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 2
(2,615 Views)