07-12-2018 02:44 AM
Hello,
I want to read .dat File and convert into the text file.
This file is in Binary format and I know the header information of binary file..
What i want to do in my project, is as follow.....
1) I have the data file(.dat File) of my ECG data.
2) Convert this data file into text file and the file which i can read or mean it.
3) convert this text file into TDMS file sothat i can use it in Biomedical toolkit.
I have the problem in Step 2
In the step 2 i can not get the numeric data of data file, it is represented in some special character, number ,Alphabet any other type of symbol
i just want the text file which have data with delimiter and can read as a normal file
plz help
thanks in advance.
07-05-2018 05:41 AM
Dear sir,
I also have little bit similar problem.
I also want to read the data file( .dat file) and convert this data file into the TDMS file so that i can use it in the biomedical toolkit to extract the ECG parameter because the biomedical read file VI takes only TDMS File formate as a input.
Please help .
Thanks in advance
07-05-2018 05:50 AM - edited 07-05-2018 05:50 AM
Hi Shagun,
as has been said in this thread before: you need to know the format of your "dat" file to be able to read it's content.
Do you know the format?
07-05-2018 07:14 AM
yes i know the format of dat file i mean i have a file which is in ASCII and want to convert in to tdms format so that it can be read by biomedical toolkit.
07-05-2018 07:34 AM
Hi Shagun,
when you know the format, then it should be no problem to read the data from your "dat" file.
After reading those data you simple store them in a TDMS file…
- As your file is "human readable" (aka "ASCII") I suggest to use ReadDelimitedTextFile to read your data.
- For writing a TDMS file you need to use the TDMS file functions. (There are example VIs explaining their usage.)
07-12-2018 02:56 AM
You need to know the exact format of the binary file.
It is unlikely that we will be able to help, if you do not apply the sample file and its format
07-12-2018 02:58 AM
Hi Shagun,
I merged your messages…
In the step 2 i can not get the numeric data of data file, it is represented in some special character, number ,Alphabet any other type of symbol
i just want the text file which have data with delimiter and can read as a normal file
You once wrote you know the format of that textfile…
Without providing more information about your "textfile" we cannot help much more!
Attach the file (or a smaller part of the file, if it's too big).
07-13-2018 02:48 AM
Please can you share your VI to read Dat File...
Thanks in Advance.
07-13-2018 03:00 AM
Hi Shagun,
again I moved your message from an unrelated thread into your own thread. Please stop hijacking old and unrelated threads!
share your VI to read Dat File...
To read the dat file is no problem at all:
The real problem is to parse the data afterwards!
So again I have to ask you to upload your dat file (or atleast a part of it) and to describe the data format used in that file. Once you said you know about all that…
07-13-2018 01:40 PM - edited 07-13-2018 01:41 PM
If you do know the structure of your data, you can combine Reading and Parsing in a single step. This Snippet assumes that I know that the Data file contains (only) an Array of a Cluster that contains Acquisition Configurations, for which I have created a TypeDef. This opens the file, reads the data into a LabVIEW Variable of type "Array of Acquisition Configurations", then closes the file.
If there are additional (different) types of data in the file, you can add additional Binary Read commands, wiring into the Data Type input the appropriate Data Type, and they will be read/parsed as well.
One caveat for this to work -- Arrays and Strings must have been originally written with "Size" information prepended. Otherwise, you need to be able to deduce the sizes and, in a For Loop indexed to the Array size, read in single elements, passing them out through an indexing tunnel to build the Array of Whatever (or String).
Bob Schor