BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

Highlighted

@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?)

Example_VI.png


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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Message 2101 of 2,226
(944 Views)
Highlighted

@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?)

Example_VI.png


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.

0 Kudos
Message 2102 of 2,226
(936 Views)
Highlighted

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 2103 of 2,226
(933 Views)
Highlighted

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.

0 Kudos
Message 2104 of 2,226
(913 Views)
Highlighted

@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.)


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 2105 of 2,226
(903 Views)

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.

Tim
GHSP
0 Kudos
Message 2106 of 2,226
(897 Views)
Highlighted

@aeastet wrote:

Sounds like we need a thread in Breakpoint or a Nugget for this.


Well yes. 😄


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
Message 2107 of 2,226
(887 Views)
Highlighted

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.Smiley Surprised

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 2108 of 2,226
(860 Views)
Highlighted

I guess a millipede has 1000000 mft. 😄


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
Message 2109 of 2,226
(842 Views)
Highlighted

@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?

 

Spoiler
Maybe I should take a bus I bet C.A. would approve

more like 12,000,000 m" (or 1,000,000 m') It could be 1Mm'

"Should be" isn't "Is" -Jay
0 Kudos
Message 2110 of 2,226
(812 Views)