LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string into data

I have a 2-D array of strings, like 2E-7, 3.4E-9; 2.1E-7, 3.3E-9;...........I want to conver them into data. I found a "strip/xxx" vi, however, it can only give me 0.00, 0.00. What should I do in order to keep the same value without any truncation?

THanks
0 Kudos
Message 1 of 6
(2,951 Views)
You only need to use  a Frac/exp string to number function (in the string sub-palette), as in the attached vi.
Chilly Charly    (aka CC)
Message 2 of 6
(2,947 Views)
I did exactly the same as shown in your attached file. However, the numbers were all zeros after I saved the data. My guess for that is: LV truncates everything else after they save the first three digits of the data. Do you know how to avoid that?
0 Kudos
Message 3 of 6
(2,943 Views)
Check the display format : the digits are probably still there, but not displayed. Right click and go to
"Format & Precision". Select either Automatic formating or Scientific, and see...
Chilly Charly    (aka CC)
Message 4 of 6
(2,939 Views)
Upon reading your reply, you said that the numbers were all zeroes after saving the data. Beware of the file saving functions, and specially of the "save to spreadsheet" vi, since it save the data as floating points with only 3 digits. If this is your case, change the optional input format specifier to %#g or %#e, where g and e stand for automatic and exponential formating , respectively, and # is the number of digits you want after tha decimal separator.
Chilly Charly    (aka CC)
Message 5 of 6
(2,936 Views)
Thanks a lot. I fixed the problem already.

0 Kudos
Message 6 of 6
(2,921 Views)