LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
ASTDan

Custom units in build unit string

Status: New

I think it would be cool to be able to define custom units in the build unit string function.  For example (%, dB, or Dan's).  The ability to include custom units would remove the burden to include every unit in this dialog.  Adding custom units would also help people who have large complex calculations.

 

Unit Dialog.png

Dan Shangraw, P.E.


   

11 Comments
usrfrnly
Member

I Like this idea too - I discovered this post while searching for a way to do it. It would save me a lot of grief when using a stepper motor of indeterminate step size.

Brian_Powell
Active Participant

I agree and kudo'd the idea.  Units have a lot of potential, but also some rough edges.

 

I will point out that this is a difficult task.  It more or less requires that we rearchitect the way we do units in LabVIEW.  Things are so coupled with the compiler, making dynamic runtime unit evaluation impossible.  (This is also why polymorphic units have some usability issues.)  Also as you point out, we don't support non-linear units (e.g., dB).

 

When I was a group manager in LabVIEW, I thought so highly of this idea that I put one of my engineers on the task.  And then he left to become a group manager himself. Smiley Sad

 

We're working on some projects that might give us a chance to revisit this, so please vote it up if you'd like units to work better.

 

ASTDan
Active Participant

Wow Brian,

 

Thanks for the explaination!

 

 

Dan Shangraw, P.E.


   

GregSands
Active Participant

+1 for better support for units.

NI-hilator
Member

In addition to custom units it would be helpful to have ratios as well (whether custom or not).  i.e. miles/hour, feet/second, degrees/hour, degrees/second, liters/minute, liters/hour etc.

Brian_Powell
Active Participant

@NI-hilator, ratios are already built in.  Miles per hour, for example, is "mi/h".  All the other units you mentioned are already supported, as well, so you can construct those ratios, too.

 

If we added custom units, we would allow you to use those custom units in ratios.  So kudo this idea if you want to be able to create furlongs/fortnight. 🙂

 

Brian

ASTDan
Active Participant

I look forward to the day when the unit Brian can be defined as furlong/fortnight Smiley Very Happy

Dan Shangraw, P.E.


   

Jason_Harrigan
Member

I sure want units to work better. +1

 

Right now I'm struggling with not being able to use dBm.

Q7
Member
Member

+1 on the Kudos! Please implement this idea now! I have desired custom units for years. It is utterly wrong to have to append the indicator/scale/control caption with the units instead of having a seperate label space for them. It also makes it more difficult to change units when you then have to update the caption to reflect the change.

 

On that note, anybody know how to insert a Mu for microseconds in a caption without using a symbol font?

GregSands
Active Participant

@jbjorlie: on Windows you can get µ by holding down the Alt key while typing 0181 on the keypad.  Look at the Windows Character Map for other keycodes.  Oh, and also kudo my idea here for making better use of µ and ² (0178) and ³ (0179) in units.