LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Fract/Exp String To Number fucntion

My idea is using this"Fract/Exp String To Number" function to read a number from a text file, but what value should I input in the default parameter if I want to read a number up as small as 1e-9,since the default value is zero , just can read a number up to doublem precision.
my email is ee_cwkac@stu.ust.hk
Thank you veyr much!
0 Kudos
Message 1 of 9
(4,472 Views)
As the help states "If you leave default unwired, the parameter defaults to a DOUBLE-precision, floating-point value of 0". Just wire another type (EXT) to default and the result will change its type too.
Hope I understood your problem.
0 Kudos
Message 2 of 9
(4,472 Views)
I tried
, but it doesnt work
0 Kudos
Message 4 of 9
(4,472 Views)
It seems that I misunderstood the problem. I thought that the DBL type wasn't good enough for your default number (regarding precision).
Anyway, you already have answers on haw to set the DISPLAYED precision.
Let us know if there are some other problems.
0 Kudos
Message 8 of 9
(4,472 Views)
Jan,

I just created a simple VI that inputs from a string control the string "0.000000001" and outputs, to a DBL, with the format/precision set to 10 digits of precision, and engineering notation, the value "1.0000000000E-9" (as a number of course.) The only input to the Fract/Exp String to Number function was the string. So, as long as you have those characters written in the file properly, and you have your indicator setup right, you shouldn't need to input anything else into the primitive.

Good luck.

If you need, I can submit the VI.
0 Kudos
Message 3 of 9
(4,472 Views)
Hi, thank you for your help
but where you set the format/orecision.
I would appreciate you very much if you can submit the VI.
thanks
0 Kudos
Message 5 of 9
(4,472 Views)
To set the format and precision of a front panel indicator, right click on the indicator and select Format & Precision. Remember, this just changes the visual appearance of the DBL number.
0 Kudos
Message 6 of 9
(4,472 Views)
To set the format and precision of a front panel indicator, right click on the indicator and select Format & Precision. Remember, this just changes the visual appearance of the DBL number. You don't do anything to the default input on the function. This changes TYPE (i.e. from the default of DBL to SGL).
0 Kudos
Message 7 of 9
(4,472 Views)
Here is a VI that shows how you can do it. It is related to what was said by Lab Viewer earlier. The conversion precision in the function you meniton is DBL by default but you can set it to EXT if you want. I demonstate what happens for both cases in my simple example(using the number 1/3). Also, precision in the data type is one thing (representation) but the displayed precision is something else. The latter you set on the indicator. I used 18 decimal places in my example. I hope this helps. /Mikael
Message 9 of 9
(4,472 Views)