LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading a 2D txt file of binary data into a 2D array

Solved!
Go to solution

Hello,

 

So I have a text file of 16bit binary data, with 8 different rows and columns, so 64 total data points. I am trying to read all this data into a 2D array. My current VI is only reading the first column, and I can't seem to make it read each of the 8 columns. Can someone help me on this?

My current VI:

LV_question.PNG

 

0 Kudos
Message 1 of 6
(3,059 Views)

Please attach the text file and your VI. Is the delimiter really a comma?

 

Is the data formatted in binary or is it a binary file? Big difference!

 

(We cannot see how things are connected from the picture. You don't need to wire the -1, because it's the default)

0 Kudos
Message 2 of 6
(3,050 Views)

The delimiter is really a comma. It is a text file that I wrote that corresponding to the bytes necessary to call specific DACs. 

Download All
0 Kudos
Message 3 of 6
(3,037 Views)

Look on the File I/O Palette for Read Delimited Spreadsheet.  Note that the default delimiter is <tab>, but you can wire a comma (",") to this input and it should do "what you want".  Read its Help file ...

 

Bob Schor

0 Kudos
Message 4 of 6
(3,032 Views)
Solution
Accepted by topic author lmcohen2

Your wired delimiter is currently (in \-codes) "\t,", i.e. it contains an extra tab. make sure it only contains a comma!

0 Kudos
Message 5 of 6
(3,029 Views)

You're a life saver, altenbach. Thanks!

0 Kudos
Message 6 of 6
(3,022 Views)