LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

numeric control error handling

Hi all,
 
I have two question about numeric control.
 
1) "How to handle invalid inputs?"
 
Let say, I have one numeric control that can only accept 0 to +inf (Range). So negative input will be invalid data input. Whenever I typed the negative value on it, this control automatically changed back to default (min) value. What I want is that. Is there anyway to detect invalid user input? So that I can program whenever user input negative number, it will automatically change back to previous valid input (not default value).
 
2) "How to assign the dynamic range of numeric control?"
 
I used property node to assign the range but my problem is that. I assigned min 0.1, max 1.2 and increment 0.1 but I cant able to select 1.2 or sometime 0.1 by using increment/decrement arrow. Maybe because of floating points? And also I want to do when user input overrange value (eg.1.3) by typing, the value should go back to previous valid input.
 
Any idea? Thanks
0 Kudos
Message 1 of 2
(2,229 Views)
You can choose how LV will react on entries exceeding a limit. The default is, that LV coerces the value to the limit. But you can also ignore the limit and the user can enter any value.
Nevertheless, if you ignore the limits, you always have to check in your software for invalid values!

Regarding 2) i couldn't reproduce what you described. Maybe you should post a little example....
For the 2nd part of your question, please see my answer above...

hope this helps,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 2
(2,224 Views)