From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

entering numeric values with suffixes in Labwindows CVI (e.g 100 kHz instead of 100e3 or 100000 )

is there any practical way of entering numeric values with suffixes in Labwindows CVI in order to prevent user from struggling with '0' es. 

 

0 Kudos
Message 1 of 5
(3,636 Views)

Hi,

 

one simple way might be to change the label from Hz to kHz, enter only 100 instead of 1e5, and multiply the value obtained from the numeric control by 1000 for further use in your program...

0 Kudos
Message 2 of 5
(3,634 Views)

thanks:)

but i meant entering 100kHz or 1Ghz directly to the numeric control but it is not possible to enter a letter in numeric control.

taking 1000 Hz as reference doesn't solve the problem for  entries with unit 'mega' or 'giga' hertz, and also entries with unit Hz again will be

shown with 'engineering form' in the numeric control.

0 Kudos
Message 3 of 5
(3,629 Views)

So what you could do is using two adjacent controls, a numeric and e.g. a ring or text control where the user can select or enter the unit: Hz/kHz/MHz/GHz. Another option could be to use a string control instead of the numeric control and parse the entered string; however the string control lacks the up/down arrows...

0 Kudos
Message 4 of 5
(3,625 Views)

In LabVIEW there is another Display Format called "SI Notation" that is exactly what you're looking for.

Maybe you can add a feature request in CVI Idea Exchange Forum and ask NI to add this Display Format in CVI too.

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 5 of 5
(3,621 Views)