From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble Reading DTA File Generated by LabVIEW

Hello,

 

I have a 3rd party LabVIEW application (.exe only, no source code) that is generating DTA files that I a have not been able to successfully read using a variety of software packages (LabVIEW, MATLAB, Excel, Stata, etc.).

 

Since the files were generated by a LabVIEW application, I would think that LabVIEW would be able to read these files as well. I have tried "Read from Binary File" in LabVIEW specifying different byte orders, but am not getting the data I desire from the file. The files should hold numerical values, and there MAY be some header information, but I'm not sure since I'm not able to read them.

 

I've attached an example file. I changed the ".dta" extension on the file to ".csv", as ".dta" is not one of the accepted file types for attachments. Any help or guidance is greatly appreciated.

 

Thank You,

Akshay

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

@AkshayHari wrote:

Hello,

 

I have a 3rd party LabVIEW application (.exe only, no source code) that is generating DTA files that I a have not been able to successfully read using a variety of software packages (LabVIEW, MATLAB, Excel, Stata, etc.).

 

 

Thank You,

Akshay


The .dat file generated can be imported into a Microsoft Excel spreadsheet for calculations and graphing purposes as follows:
Start excel
File Open
Select "All files"
Select your .dat file (previously recorded and saved).
Select "delimited" (as opposed to the default "fixed width")
Import starting at line 33
Next
Unselect "Tab"
Select "Semicolon", you should see bars separating the data fields now.
Next
Define each field. European users will have to select "Advanced", then change the "Decimal point" to "." and "Thousands separator" to ","
field 1,2 = date YMD

Hope this helps 

 

Kudos Welcome 🙂

 

Certified-LabVIEW-Associate-Dev_rgb (2).jpg

Certified LabVIEW Developer
Best LabVIEW Programmer @NIDAYS 2015
0 Kudos
Message 2 of 6
(4,022 Views)

Thanks a lot for getting back to me.

 

However, the steps you outlined did not work for me. What should I put in the "File origin" box? I quickly parsed through all of the options and did not see one that led to the data I expected to see (they all showed special characters in the Preview box).

 

Could you share the Excel file into which you successfully imported the data?

 

Thank You,

Akshay

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

Hi Akshay,

 

Have you had any more luck opening the .dat or .dta file? Could you upload the original file and not the .csv file? Do you get any errors or does it not show up correctly? 

 

Also, do you have any information about the executable that is generating the file? 

 

0 Kudos
Message 4 of 6
(3,980 Views)
Haven't had any luck. The forum didn't let me attach a .dta file, so I simply changed the file extension to .csv so I could attach the file. Changing the extension back to .dta would get the file back to its original form. All that being said, I'll put the .dta file in a .zip file tomorrow morning when I'm back in the office (I don't have access to the file now), and I believe I should be able to attach that .zip file.

I don't get any errors when trying to read the file via LabVIEW's "Read From Binary File", but the output I get is just a random set of special characters. The output should hold time-series numerical data (and there may be some header information).

The .exe generating the files was developed by a 3rd party vendor, and I don't have any details regarding how the LabVIEW application is writing the files. I don't have access to the source code, but I'm in contact with the 3rd party vendor to learn more.
0 Kudos
Message 5 of 6
(3,972 Views)

Please find the original .dta file in the attached .zip file.

 

Thanks,

Akshay

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