LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Gigaseconds[Gs] vs Gauss[Gs]

Solved!
Go to solution

Hi everybody. A funny question.

Using the "Convert Unit" function I try to convert a time string with units (i.e. "1Gs") into a double number represented in the correspondent base unit.

For example:

String In: "10ms".

A simple code separates the "numeric string" from the "text string". This is <10> and <ms> respectively.

Using the "text string" as the selector input of a case structure I use the "Convert Unit" function to convert the unitless "numeric string" into a double with time units.

I have done this for all SI prefixes (m or mili, M or Mega, etc.).

The point of my question is the following. When construction the units for Gigaseconds, or Gs, LabVIEW detects it as a Gauss. This causes a broken wire error because LabVIEW believes I want to connect magnetic flux density units (tesla or gauss) with time units (seconds).

Is there a way to especifity that the "G" in "Gs" is actually a prefix and not part of the unit itself?

Thanks!

0 Kudos
Message 1 of 7
(3,276 Views)

Let me state first that I don't use units, so this may be wrong, but as far as I know, there's no way to change the order in which units are interpreted, so I think the only thing you can do in this case is to do a double unit conversion. You'd have to take the unitless numeric value and multiply it by 1E9 to change it to the equivalent number of seconds, and then set the unit to seconds. Then you could follow that with another Convert Unit that changes it to Gs.

0 Kudos
Message 2 of 7
(3,255 Views)
Solution
Accepted by topic author odiseo123

Simple solution: just put a space in between.

So: "G s" is gigaseconds

and: "Gs" is gauss

Message 3 of 7
(3,251 Views)

Ha! Now that's much better. Makes sense, since a space is used to indicate multiplication.

0 Kudos
Message 4 of 7
(3,242 Views)

The gauss is not an offical SI unit.  Using the preferred tesla (T) should avoid the problem. 1 gauss = 10^-4 T.

 

Information is from the Guide for the Use of the International System of Units (SI), NIST Special Publication 811, 2008 edition.

 

Lynn

0 Kudos
Message 5 of 7
(3,207 Views)

I know that. Thanks for your comment but that does not really solve the problem. As concluded, Gauss units (Gs) can be distinguished from Gigaseconds (Gs) by introducing a space between prefix and unit, so "G s".

0 Kudos
Message 6 of 7
(3,194 Views)

The gauss is also not listed in the LV help.  Search the help for 

Available Units in LabVIEW

 

Lynn

0 Kudos
Message 7 of 7
(3,178 Views)