LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving data as ASCII

Hi
 
I want to use the data accquired from the DAQ in MATLAB. What would be the best format I could store the data in? I was thinking of storing it in ASCII format since its universal, or even .txt file (that I can read easily). I evetually want to use MATLAB to filter the signal I have accquired from the DAQ and then use the same data in a C program for further signal processing. I dont know how can I save data as ASCII or .txt file, it saves it in LVM format.
 
Any help will be appreciated, I am new to this software and using it for my thesis project.
 
Thanks
 
Rohit
Rohit Narula
4th Year Electrical Engineering
Ryerson University, Toronto
Ontario, Canada
Email: rohit.narula@gmail.com
0 Kudos
Message 1 of 7
(4,367 Views)

Hi Rohit,

Assuming you only want to save numeric data, The 'write to spreadsheet.vi. in the file functions palette should do the job for you

Here you can specify the location as well as the file type.

Just give the file name as '*.txt'

Also read the documentation for that function using help window to get to know how to use it

Regards

Dev

 

 

0 Kudos
Message 2 of 7
(4,360 Views)
Hey Dev
 
Thanks a lot for your reply. I really appreciate your help Smiley Happy Is there any way I can save the data in ASCII to? I am really greatful for the help you have given me so far. It is really helping me in my project.
 
Thanks
 
Rohit
Rohit Narula
4th Year Electrical Engineering
Ryerson University, Toronto
Ontario, Canada
Email: rohit.narula@gmail.com
0 Kudos
Message 3 of 7
(4,357 Views)
Hi Rohit,
 
Rohit : "Is there any way I can save the data in ASCII to? "
 
Sorry i did not get what exactly you are asking
Plz explain
 
Dev
 
0 Kudos
Message 4 of 7
(4,352 Views)
An LVM file is a text file.  It just has a lot of header information.  MATLAB should be able to read it with no problems, just start your read after the header.  The header will be a fixed number of lines, given whatever configuration you use in the LVM write VI.  There is also an option in LVM write to turn the header off and write a plain delimited text file.  This may be your best bet.
0 Kudos
Message 5 of 7
(4,341 Views)
Hi

Thanks a lot for youe help. It did work. As you said, MATLAB is able to read in the LVM file to further processing. Thanks a lot for the help DF Gray. When I open the LVm file with MATLAB, it shows one column of the data vales that I need to store and another column of filled with 0 1 2 3 4 but I figured this part out. I just selected do not display time stamp.

Thanks again, you guys have given me a lot of support for my project Smiley Very Happy

Rohit

Rohit Narula
4th Year Electrical Engineering
Ryerson University, Toronto
Ontario, Canada
Email: rohit.narula@gmail.com
0 Kudos
Message 6 of 7
(4,313 Views)
If you needs expand to something a bit more hierarchical with much higher performance, and you want a challenge, give HDF5 a try.  It is supported by most major analysis packages (including MATLAB).  You can get a LabVIEW API by searching for "HDF5" on ni.com.  WARNING.  The learning curve is very steep.  However, the payoff is really high.  If you do try, remember that HDF5 is single-threaded under Windows.  Don't try to call the code from two places at once in LabVIEW (very easy to do) or you will get anything from a minor fault to corrupt data to a blue screen.

Good luck.  Let us know if you need more help.
0 Kudos
Message 7 of 7
(4,306 Views)