Evan A Young wrote in message news:<506500000008000000CB6A0000-1031838699000@exchange.ni.com>...
> I have 500 different possible inputs from 0.0 to 49.9
>
> Depending on the data, the inputs must be treated differently. This
> makes sense to use a case structure.
>
> Now my question is, can you set a case structure to take ranges of
> numbers.
>
> for example.
> Do operation A to all numbers less than 10
>
> Do operation B to all numbers greater than or equal to 10 and less
> than 20.
>
> Do operation C to all numbers greater than or equal to 20 and less
> than 30.
>
> and so on...up to 49.9
>
> Is there an easy way to set this up?
There are lots of different ways to do this, depending on which way
you like to write this software, and how muc
h work you want to do.
I suggest the following:
make a case structure with 4 frames, (operation A,B,C,D), then use 4
"in range & coerce.vi" to decide which operation to do depending on
the ranges you set. You run the 4 boolean in range outputs together
as a single number. Then you use this number as the selector for your
case structure. Basically then this means that if ONLY the boolean
for "in range A" is true, your data will go in and execute case A and
so on. The only drawback to this idea is you need to decide what to do
about the default case.
I know this sound kind of complicated, I can make an example if you
really need one, repost here if you need it.