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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital unit control to string conversion

Solved!
Go to solution

Hi Everyone,

 

I'm trying to convert a digital control with min as unit, to a string.

The matter is that it will convert it to seconds before it updates the string indicator.

 

UnitsDebug.png

 

I noticed that the "format into string" will always convert first to the base unit (unit multiple value to unit value conversion), just like kW to W (10 kW will output 10000 W) for watt unit.

 

Is there a way to format the input value without this conversion to the base unit first ?

 

Thanks to you...

 

0 Kudos
Message 1 of 3
(2,309 Views)
Solution
Accepted by topic author LMartin

If you look up the Format Specifier Syntax in the LabVIEW help, you will see a Unit option.

 

Here is the format you want to keep the string in minutes: %{min}g


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 3
(2,293 Views)

Thanks crossrulz,

 

Didn't know about this one...

 

Cheers

 

0 Kudos
Message 3 of 3
(2,273 Views)