12-05-2013 08:56 AM
Hi johnny,
most often the problem is with the system's regional settings. You probably use the comma as decimal separator (as is standard for Germany) and so this functions doesn't recognize "34.123" as float number.
Either
- use the point as decimal separator in the OS settings
- use the format string "%.;%f" instead
- convert all comma to semicolon and all points to comma (in this order!), then use "%f" with a semicolon as delimiter
Another (Very seldom) reason may be: the user has wired an INT datatype in the type input...
12-08-2013 06:45 AM
Thank you so much GerdW!!!
The format that you gave me didn't work actually,but I did that with the OS settings and now I m getting the results I want!
Thank you again,I woulnd't find this by my self!
07-04-2014 03:36 AM
Hi All,
Anybody can help me urgently to convert attached text into 1d string array.
Please ignore any symbol. Just 1 row text into 1 row array & continous.
Thanks in advance
Sufian
07-04-2014 03:42 AM
07-04-2014 08:01 PM
Hi GerdW,
There is an error "not enough memory" generated.
Currently, I am using Windows7 & Labview 2010.
Actually, this is large text file (2xxMB) & I still fighting to do conversion faster.
07-04-2014 08:34 PM - edited 07-04-2014 08:34 PM
You could try reading the file one line at a time and convert the one line to an array. You can then use autoindexing out of the While loop to build up your 2D array.
07-04-2014 08:48 PM
Hi GerdW & Crossrulz,
I have found a better & fastest way for conversion as per attached.
I also decided to use 2D array rather than 1D array.
Thanks for your feedback
Sorry for inconvenience caused
07-04-2014 09:26 PM
08-07-2014 12:28 PM
Does anyone have a solution to the OP's question using the spreadsheet string to array? I am having the exact same problem where my strings are only showing up in the first element.
Apparently you guys love reading from a file, but I don't have the luxury of piggybacking that file into every distribution of the executable, so I want to hard code this portion into the VI. Please suggest a solution using the spreadsheet string to array.
Attached is an image showing why spreadsheet string to array is so useful for me. It avoids the painstaking task of wiring up allll of these strings to a build array and then hoping that everything is in the right order. With spreadhseet string to array, then i can just copy and paste from a spreadsheet to *hardcode* this into the vi AND I don't have to wire up all these strings across multiple screens AND I don't have to make sure they're in the right order. I can just copy and paste! 🙂 Thanks.
08-07-2014 12:34 PM - edited 08-07-2014 12:37 PM
I figured it out!!! Arghhhh labview.
I had to use a 2D array! and then chop it back down to a 1D array. Even though I wanted a 1D array in the first place, labview couldn't read my mind. I struggle with labview so much.
IN the attached image, "array" is a 2D array of my strings. And then "subarray" is of course the 1D version that I want. This will serve as the solution to the OP's question for future reference. Thanks guys.