LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String Woes (From Expo/Frac/Eng)

I have used the string function "From Exponential/Frac/Eng"
many times and it has always worked fine.
At least till now. I was working with an old piece
of test gear and found that the floating point format
it uses is slightly unusual. I am reading a frequency
so it is always positive and greater than one.
The format it returns is this:
numberE
and in Engineering format (exp is multiple of 3)

I suppose this was done to accomodate the sign and
always send the same number of bytes. Anyway on the the
problem. It appears that the "From Exp" can not deal with
either a space before the "E" or with a negative exponent.
"1.2-E3" will yield 1.20 in a numeric.

I have tried this on V5.0.1 and 5.1 in Unix
and V
5.1 in Win95 they both do the same thing.

Any one else notice this ir have I been at work to long ?
Kevin Kent
0 Kudos
Message 1 of 5
(2,848 Views)
Dang I just realized that the function expects the sign to
be AFTER the "E" not BEFORE.
I'll go home now before I hurt myself.

"Kevin B. Kent" wrote:

> InumberE
> and in Engineering format (exp is multiple of 3)
> . It appears that the "From Exp" can not deal with
> either a space before the "E" or with a negative exponent.
> "1.2-E3" will yield 1.20 in a numeric.
> Any one else notice this ir have I been at work to long ?
> Kevin Kent
0 Kudos
Message 2 of 5
(2,848 Views)
Don't you hate dumb mistakes? I tend to forget to initialize shift
registers...

BTW, this is off-topic, but does anyone else get confused with "From
(exp/dec..)" and "To (exp/dec...)", because the "From Decimal" is
actually taking in a string and converting it *To Decimal*. The "To
Deciamal" is actually converting *From a Decimal". Just seems backward
to me.

Rick
-

rick@csciences.com

Chesapeake Sciences Corp.
1127B Benfield Blvd Millersville, MD 21108

Tel: (410) 923-1300 x3430 Fax: (410) 923-2669
0 Kudos
Message 3 of 5
(2,848 Views)
Rick Nelson wrote:

> Don't you hate dumb mistakes? I tend to forget to initialize shift
> registers...

Yep, guess that's what I get.

>
>
> BTW, this is off-topic, but does anyone else get confused with "From
> (exp/dec..)" and "To (exp/dec...)", because the "From Decimal" is
> actually taking in a string and converting it *To Decimal*. The "To
> Deciamal" is actually converting *From a Decimal". Just seems backward
> to me.

It does seem backwards but I remember it by appending "String"
So it becomes From Decimal STRING, and To Decimal STRING.

Just another good reason to have the help window open.
Kevin
0 Kudos
Message 4 of 5
(2,848 Views)
Rick Nelson schrieb:

> Don't you hate dumb mistakes? I tend to forget to initialize shift
> registers...
>
> BTW, this is off-topic, but does anyone else get confused with "From
> (exp/dec..)" and "To (exp/dec...)", because the "From Decimal" is
> actually taking in a string and converting it *To Decimal*. The "To
> Deciamal" is actually converting *From a Decimal". Just seems backward
> to me.

Rick,
you are somehow right, but there is trick to remember which is which:
the functions like "From Decimal" and "To Decimal" are in the STRING
submenu.
So just think of appending the word "string" to them and everything is
obvious:
"From Decimal (string)" and "To Decimal (string)"....


>
>
> Rick
> -
>
> rick@csciences.com
>
> Chesapeake Sciences
Corp.
> 1127B Benfield Blvd Millersville, MD 21108
>
> Tel: (410) 923-1300 x3430 Fax: (410) 923-2669
0 Kudos
Message 5 of 5
(2,848 Views)