ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to develop a Case Structure with numeric input control

I'm trying to develop a Case structure in LabVIEW 6.1 for the following pseudo-code:
 
int x;
 
if(x<=0)
y=0;
elseif(x==1)
y=1;
elseif(2<=x<=4)
y=2;
else
y=5;
end
 
I'm getting an error 'selected values are not unique' and can't seem to figure out where the problem is.... could someone kindly assist.
 
0 Kudos
Message 1 of 2
(2,703 Views)
Piece of cake. To enter a range of values, you use"..". So for "..0", it would all numbers less than or equal to 0. "2..4" would mean all numbers from 2 to 4 inclusively.
0 Kudos
Message 2 of 2
(2,697 Views)