LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert data in the text file to table in DBL

awesome.
1)whats the thing behind the small trick?
 
2) Is the table format same with the 2D array of DBL cause i will have to use it later. I need the data in DBL of 2D array.
 
3)also explain abt my mistake too
 
thanks mike. saviour of the day .
0 Kudos
Message 11 of 30
(892 Views)
Hi sean,

here's the hard way:

Hmm, Mike beats me... And his solution is more elegant, but: mine is the "hard way"Smiley Wink

Sean:
The trick is to know the correct separator between your data. In your case it's not the (usual) tab, but a double space!


Message Edited by GerdW on 05-21-2008 09:23 AM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 12 of 30
(892 Views)

GerdW

thks for the reply too.

U're the best. But mike is simple and elegant.

GerdW could u explain urs too cos I had diffculties understanding.. i just a newbie though i had completed all the neccessary studies

0 Kudos
Message 13 of 30
(883 Views)
Hi Sean

the two functions are "Search and replace chars" (in the while loop) and "spreadsheet string to array". The rest should be clear from the comments...

I was misguided by the fact that there are sometimes 2, sometimes 3 spaces depending on sign of following number. That's why I took the long way. Use Mike's example, it's much more readable...

Our both solutions will show a first column with zeros, you may want to strip it...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 14 of 30
(877 Views)
i dunno why there is /s and %g purpose?
 
can u explain gerald ?
0 Kudos
Message 15 of 30
(872 Views)
Hi Sean,

my name is not "gerald"Smiley Sad

"/s" is a space display as "/ code" (Mike is using them too!), "%g" is the format code needed by SpreadsheetStringToArray and means "scientific format". You find all those format codes in the LabView help, it's a huge page full of themSmiley Wink


Message Edited by GerdW on 05-21-2008 10:08 AM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 30
(865 Views)

GerdW wrote:
my name is not "gerald"

This is not the first time Smiley Surprised names are misunderstood Smiley Wink ....
 
Mathan


Message Edited by mathan on 05-21-2008 03:33 AM
Download All
0 Kudos
Message 17 of 30
(857 Views)

GerdW wrote:
my name is not "gerald"Smiley Sad

This is not the first time Smiley Surprised names are misunderstood Smiley Wink ....
 
Mathan
Download All
0 Kudos
Message 18 of 30
(857 Views)

Smiley Surprised

my bad

i got a problem now. though i used mike.vi at some part of my table. I found out to have 0.00 data. because my table contain some DBL values.

 

0 Kudos
Message 19 of 30
(851 Views)
Hi Mathan,

misspelling/-pronouncing are different than just wildly guessing the nameSmiley Wink

Hi Sean,

"
I found out to have 0.00 data. because my table contain some DBL values" ??? Where's the connection here? Zero because of DBL???
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 20 of 30
(844 Views)