12-17-2015 06:15 AM
Why LabVIEW allows characters (Key down) within Numeric control,
When I hit Enter button, it’ll clear all the characters and returns to 0.
My question is why does it allow specific characters(not all)?
Solved! Go to Solution.
12-17-2015 06:46 AM - edited 12-17-2015 07:14 AM
It is done for user convenience.
So to enter 5000 you can enter 5k, or to enter 0.000005 you can enter 5u.
LabVIEW allows you to enter text then validates it after you hit enter.
Hope this helps.
12-17-2015 07:04 AM
Thank you Kachik 🙂
I do agree that it's really useful, if I change the data type(representation) to U8 then I dont think most of these units are applicable!!
12-17-2015 07:13 AM
Yes, for example 5u will return 0 and 5k will be 255 🙂
12-17-2015 07:21 AM
It's also how you enter Not a Number (NaN).
12-17-2015 08:15 AM
Also things like "1E+3", as well as "Inf"
12-17-2015 08:21 AM
12-17-2015 08:29 AM - edited 12-17-2015 08:30 AM
Hi GerdW,
Thanks for the suggestion 🙂
I wanted to know the reason why It's not been implmented as part of the control, but allowing these chars(units) does make sense 🙂
Kind Regards
Sankar
12-17-2015 09:15 AM
Bottom line: What is a numeric control ?
A String !
A numeric Windows object (not talking about G object) is just a text box limited to numbers.
In C language, U8 is defined as char
In LabVIEW, you can re-format a numeric control, and use it as a string.
12-17-2015 09:17 AM