LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

numeric control question! help me.

can anybody help me?
 
For the numeric control,I want to achieve the funciton that when the numeric at range of 100-1000,the increment is 100.And at range of 1000-10000,the increment is 1000.
 
I attempted to realize it,but I found,case make the numeric reach 1000 use click up button to add 100 method,follow-up click down button,the numeric can't return 900.
 
I'm stumped, so I turn to you for help & inspiration.
 
any help would be more than welcome!Thank you in advance!
 
Eric
0 Kudos
Message 1 of 4
(2,661 Views)
There are many alternatives:
 
You could hide the real increment/decrement buttons and replace them with small booleans. Now do everything with code. You could even wrap it into an Xcontrol (LabVIEW 8 only).
 
You could also use a value change event on your numeric control and compare previous and current values whenever the value changes. Coerce the input to the correct value (depending on the range and the direction of change) and write it back to the control using a local variable before handing the value to the rest of the code.
 
If there are only ~20 allowed values, replace it with a text ring containing the sorted  list of values. Now the increment buttons will step through all allowed values only.
 
etc.....
0 Kudos
Message 2 of 4
(2,652 Views)

altenbach,thanks a lot!

I want to konw how to realize it use the XControl method,i konw a little about XControl,can you help me?

Eric

0 Kudos
Message 3 of 4
(2,646 Views)
0 Kudos
Message 4 of 4
(2,642 Views)