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.
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.
10-02-2019 06:42 AM
@cbutcher wrote:
More useful displays might include adding units, or labeling your indicators 'inline'
(obviously for display only).(Maybe you can actually get the text representation and then do something?)
Writing to that property is exactly what my Format Numeric Quick Drop plugin does. And, yes, I put units in the format all the time. One of my favorite formats is "%#pHz" ('#' ignores 0s after the decimal, 'p' is for SI Notation). This will show values like "2.4GHz" and "10Hz". That is a lot easier to read than 2400000000.
10-02-2019 07:16 AM
@crossrulz wrote:
@cbutcher wrote:
More useful displays might include adding units, or labeling your indicators 'inline'
(obviously for display only).(Maybe you can actually get the text representation and then do something?)
Writing to that property is exactly what my Format Numeric Quick Drop plugin does. And, yes, I put units in the format all the time. One of my favorite formats is "%#pHz" ('#' ignores 0s after the decimal, 'p' is for SI Notation). This will show values like "2.4GHz" and "10Hz". That is a lot easier to read than 2400000000.
IIRC, this doesn't work that well for controls though. Some units confuse the input, mixing up the SI Notation and units.
10-02-2019 07:30 AM - edited 10-02-2019 07:33 AM
wiebe@CARYA wrote:
@crossrulz wrote:And, yes, I put units in the format all the time. One of my favorite formats is "%#pHz" ('#' ignores 0s after the decimal, 'p' is for SI Notation). This will show values like "2.4GHz" and "10Hz". That is a lot easier to read than 2400000000.
IIRC, this doesn't work that well for controls though. Some units confuse the input, mixing up the SI Notation and units.
The only time I have ran into problems was with a Scan From String. But that CAR (425562) was fixed at some point. I just tested with 2016 and it works fine. I would have to do some more forum digging to figure out when it was fixed.
EDIT: I just realized what you were referring to. Like "meters" is shortened to "m", which can be interpreted as "mili". I will have to play around with that one to see how controls react. I would guess it would be fine as long as the user did not enter the units.
10-02-2019 09:16 AM
Also have a faint recollection about mft (milli feet) that didn't work...
Not sure what the problem was exactly, but meters being interpreted as 10E-3 sounds familiar.
Units are more or less obsolete (not supported in NXG for sure). They are still natively supported in C++ though. There are use cases...
I especially use them for automatic conversion when using by reference. So I use references to load\store values in an ini file. The value property returns the real value, for instance in meters or kg) regardless the unit. The user sees the values in mm or grams. The real unit doesn't matter, I only use it to automatically convert between n, u, m, -, k, M, G, etc. Very convenient, and no substitute.
10-02-2019 09:46 AM
@crossrulz wrote:
One of my favorite formats is "%#pHz" ('#' ignores 0s after the decimal, 'p' is for SI Notation). This will show values like "2.4GHz" and "10Hz".
My favorite is some flavor of %.2ps to display benchmark timing (100.00ms, 900.00ns, 20.00s, etc.)
10-02-2019 09:48 AM
Sounds like we need a thread in Breakpoint or a Nugget for this. It is an interesting concept and I think there are a lot of people that could use this information.
10-02-2019 09:58 AM
10-02-2019 05:40 PM - edited 10-02-2019 05:44 PM
wiebe@CARYA wrote:
Also have a faint recollection about mft (milli feet) that didn't work...
Having an electronics background I'm familiar with "mil" (thousandth of an inch) due to working with circuit boards, but this is the first time I've ever heard of "milli feet". Coming from a country that is metric (hang on, isn't the U.S. officially metric too?) the idea of milli feet is horrifying.
10-02-2019 06:32 PM - edited 10-02-2019 11:12 PM
I guess a millipede has 1000000 mft. 😄
10-03-2019 02:24 AM - edited 10-03-2019 02:29 AM
@altenbach wrote:
I guess a millipede has 1000000 mft. 😄
And, I took a wrong turn this morning on the way to the office, Suddenly I'm driving 120....How fast is that?
more like 12,000,000 m" (or 1,000,000 m') It could be 1Mm'