LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I would like to read a .dat file (binary). The file contains numeric as well as text data. Could someone provide some examples/hints for this purpose?

 

 

The file is the output of a data acquisition system. I need to get the data as a 2D array (channel name and numeric data corresponding to the channel) so that i can use the data for graphical displays.

 

 

0 Kudos
Message 1 of 6
(4,673 Views)

From LabVIEW

  • Go to Help
    • Find Examples...

A window will open that will allow you to search for examples by category, key word, etc.

CLD | CTD
LabVIEW 2011 SP1 | TestStand 4.5
0 Kudos
Message 2 of 6
(4,668 Views)

 

 

I would like to know if reading the .dat file can be directly done or it depends on the program that generated the .dat file. That means whether it is required to know how the data was written to the file or if I can directly get the contents? Thanks in advance.

0 Kudos
Message 3 of 6
(4,663 Views)

It would depend on how the file was written.

You should have some information regarding how the data is stored (is it delimitied in some way?)

If the data is delimited or in a recognizable spreadsheet array format, you will be able to import the data without (much) issue; regardless of whether the data is stored as text or numeric.

CLD | CTD
LabVIEW 2011 SP1 | TestStand 4.5
0 Kudos
Message 4 of 6
(4,661 Views)

 

Thanks !!!.....Let me figure out how the data was written and then I will try to read it....hopefully I will come back with some good news..:)..

0 Kudos
Message 5 of 6
(4,659 Views)

The only difference between reading a binary file versus a text file is that when reading text, the function translates end-of-line characters as appropriate (different operating systems have different representations for the end of a line of text).  Once you open a file, you can use both "Read from Text File" and "Read from Binary File" as appropriate for each section of the file.

0 Kudos
Message 6 of 6
(4,658 Views)