LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there an easy way to change SI unit label from 1M to 1000k?

For my GUI I want to display final numbers in a format the user is used to seeing them in. I know 1M is the same as 1000k, but some people, well, they just don't. Is there a quick way to do this? I know I can format into string and do some syntax, but was hoping I could do it somehow in the numeric indicators properties. The indicators are all clustered and it will be a pain to go through and add a format into string for each indicator. 

Message 1 of 6
(2,635 Views)

You can set your display format to something like %#fk and do the math to convert your value into k.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 6
(2,599 Views)

Interesting. I'd really like there to be some "avoid decimal SI" or "long SI" of whatever it should be called. Even though 1.234M is the same as 1234k i prefer the latter. It's really only in the 1-10 range of an exponent this is relevant, as 0.123M will be written as 123k.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 6
(2,577 Views)

Yeah it doesn't seem like there is a quick way to do this through the indicator properties as I was hoping. Would be nice to "coerce" the SI unit though. 

0 Kudos
Message 4 of 6
(2,572 Views)

Could you do with with units somehow?   Think you could have a control with the units of "m" for meter, and also units of "km" for kilometer.

There you could show 1000 with units of km outside.

 

Can that transfer to units of kilo______   where you shows a unitless base number?  (no distance, volume, speed, ....   just a numeric value, but allows you to add the prefixes of k, M,  whatever?)

 

In other words, you get the benefit of using units and their accompanying prefixes, without having to use specific unit itself?

0 Kudos
Message 5 of 6
(2,556 Views)

I doubt this is easier than formatting the strings manually, but you could always make an XControl or QControl to do the work for you.

0 Kudos
Message 6 of 6
(2,540 Views)