From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-25-2013 01:49 AM - edited 12-25-2013 01:50 AM
I have a raw data file (kidney.bin) which can be read using Matlab. It shows a 2D Array in Matlab. How can I read this file in LabVIEW ?? Please go through the attachment and let me know the solution.
Solved! Go to Solution.
12-25-2013 02:16 AM - edited 12-25-2013 02:19 AM
Well, there is no documetation on the format, but it seems U8, so endian is irrelevant. Looks like it is one flat binary file without header or dimension information. Here's some simple code that seems to reproduce your expected result. (LabVIEW 8.2)
12-25-2013 02:31 AM
Well,
Thanks for your reply. I have got the solution also . Can you tell me if I can generate this kind of (.bin) file from an array or .txt file containing an array.
12-25-2013 02:42 AM - edited 12-25-2013 02:42 AM
Well, if you have the array, you just transpose it, reshape it to a 1D array and write it to a binary file without size information.
If you have a text file, you need to parse it first. How does the text file look like?
12-25-2013 02:48 AM
This is the text file.
12-25-2013 03:16 AM - edited 12-25-2013 03:29 AM
Well, each file seems to contain an index followed by 16 bytes formatted in hexadecimal, space delimited, and padded to two digits. line termination seems to be \s\r\n\n.
If you know that the file is clean, you can ignore the data up to the ":" and simply parse the rest of each line (ignoring the empty lines)
12-27-2013 05:05 AM - edited 12-27-2013 05:13 AM
Well the file is clean, It is containing the actual data I want. We have checked it. How can I ignore the data upto the : using LabVIEW, I also need it to be in Array format, when I am calling it in LabVIEW using Text reader VI, I can see the output but in String format.
I also need it to be converted into decimal value (U8 format).
12-27-2013 05:31 AM
12-27-2013 10:15 AM
That link won't really help you because you also have delimiters netween the elements.