10-14-2019 06:19 AM
This must have been discussed before but I cannot find it.
In LabVIEW, scientific notation is displayed in the form "1.234E+5", but the standard for scientific notation is 1.234 x 105. I would like both numeric indicators and graph scales be able to display like that. Is there a reasonable way to get that? I’m guessing no since there is a superscripted character in there.
But can NXG do it?
At least it would be nice to get graph scales in this format (whatever it is called): 105.
Bonus points to anyone finding a way of formatting SI units the standardized way, with a space between the value and the unit, like "2.4 GHz", standard SI style convention. And no, "%#p Hz" is incorrect.
10-14-2019 06:24 AM - edited 10-14-2019 06:28 AM
Hi thols,
@thols wrote:
This must have been discussed before but I cannot find it.
Yes. Like here…
I guess NI follows the "industry standards" with same (or very similar) format codes as in any other programming language…
(You can always create your own formatting/conversion routines to create 2D pictures containing the requested "1.2345×10³"…)
@thols wrote:
but the standard for scientific notation is 1.234 x 105.
Is it really "standard" to place the char "x" (ASCII-120) in between the numbers? 😄
10-14-2019 08:34 AM
@thols wrote:
This must have been discussed before but I cannot find it.
In LabVIEW, scientific notation is displayed in the form "1.234E+5", but the standard for scientific notation is 1.234 x 105. I would like both numeric indicators and graph scales be able to display like that. Is there a reasonable way to get that? I’m guessing no since there is a superscripted character in there.
But can NXG do it?
At least it would be nice to get graph scales in this format (whatever it is called): 105.
Bonus points to anyone finding a way of formatting SI units the standardized way, with a space between the value and the unit, like "2.4 GHz", standard SI style convention. And no, "%#p Hz" is incorrect.
It must be some kind of standard, because if you paste "1.234E+5" (sans quotation marks) into any spreadsheet application, you get the number. I think this must be a standard for SI units in a computer-ready format because you'll find almost every instrument will output numbers in this fashion. I've never seen an instrument return numbers in what I would call "human-formatted" SI units. Takes too many extra characters. 1.234E+5 or 1.234 x 10^5. Too much wasted space - half again as much space - taken up conveying exactly the same information.
10-14-2019 08:39 AM - edited 10-14-2019 08:41 AM
If forgot to mention that your request is entirely reasonable, though. And as for part 2 of your post, that really annoys me as well. There should be a space, and the fact that there isn't makes that format useless to me. (Probably my tendencies towards OCD is in play here.)
10-14-2019 09:07 AM
@billko wrote:
And as for part 2 of your post, that really annoys me as well. There should be a space, and the fact that there isn't makes that format useless to me. (Probably my tendencies towards OCD is in play here.)
I just don't have the space and I am content (%#pHz). There was some discussion about this in the Rube-Goldberg thread.
10-14-2019 09:51 AM
@crossrulz wrote:
There was some discussion about this in the Rube-Goldberg thread.
It wouldn't surprise me if that discussion was the trigger for this thread!
10-14-2019 10:03 AM
@GerdW wrote:
Hi thols,
@thols wrote:
This must have been discussed before but I cannot find it.
Yes. Like here…
I guess NI follows the "industry standards" with same (or very similar) format codes as in any other programming language…
(You can always create your own formatting/conversion routines to create 2D pictures containing the requested "1.2345×10³"…)
@thols wrote:
but the standard for scientific notation is 1.234 x 105.
Is it really "standard" to place the char "x" (ASCII-120) in between the numbers? 😄
Speaking as a Mathematician, I'd say "No, that should be a Times sign". 3 × 10 is different from 3 x 10. I typed the Times sign by using the numeric keypad and Alt-0215.
Bob "Picky" Schor
10-14-2019 10:21 AM
@thols wrote:
This must have been discussed before but I cannot find it.
In LabVIEW, scientific notation is displayed in the form "1.234E+5", but the standard for scientific notation is 1.234 x 105. I would like both numeric indicators and graph scales be able to display like that. Is there a reasonable way to get that? I’m guessing no since there is a superscripted character in there.
But can NXG do it?
At least it would be nice to get graph scales in this format (whatever it is called): 105.
Bonus points to anyone finding a way of formatting SI units the standardized way, with a space between the value and the unit, like "2.4 GHz", standard SI style convention. And no, "%#p Hz" is incorrect.
Also, can you get the exponent in prefix sizes? I don't have LV on this computer so can't check right now. On a calculator you can often press ENG to write it in 'engineering' units, so 1.234E5 becomes 123.4E3 (the exponent is always a factor of 3).
/Y
10-14-2019 01:21 PM
Hi Yamaeda,
@Yamaeda wrote:
Also, can you get the exponent in prefix sizes? I don't have LV on this computer so can't check right now. On a calculator you can often press ENG to write it in 'engineering' units, so 1.234E5 becomes 123.4E3 (the exponent is always a factor of 3).
From the LabVIEW help on "format strings":
Add ^ to change to engineering notation where the exponent is always a multiple of three.
10-14-2019 01:35 PM
@cbutcher wrote:
@crossrulz wrote:
There was some discussion about this in the Rube-Goldberg thread.It wouldn't surprise me if that discussion was the trigger for this thread!
I thought this sounded familiar!