05-30-2013 07:53 PM
Hi,
I'm very new to LabVIEW and this might be a very simple question.
I'm trying to read a simple labview .vi file in Matlab. I'm using LabVIEW 2012 32 bit version. I've saved a .vi file and tried to load it in Matlab as mentioned inFrom LabVIEW to the MATLAB® environmentsection of http://digital.ni.com/public.nsf/websearch/2f8ed0f588e06be1862565a90066e9ba?Open Document. But I can't load the data. May be I'm doing it in the wrong way.
In From LabVIEW to the MATLAB® environment section, I don't understand what is meant by "Write To Spreadsheet File VI on the Programming»File I/Opalette."
Can someone explain me how to do this? I just need to try reading any exmple data saved in LabVIEW in Matlab. If anyone can give any other example, that also would help a lot.
Thanking you.
Indi
Solved! Go to Solution.
05-30-2013 08:14 PM
Indi,
I think part of your problem might be understanding the terminology. The .vi files are LabVIEW programs, not data. Those cannot be "read" by MATLAB.
The Write to Spreadsheet File.vi is a VI which comes with LV on the File palette. It can be used in your program to write data to a tab-delimited text file. Such files can be read by MATLAB.
This it the way you make it work: Generate the data you want to save in your LabVIEW VI in the form of an array of numbers. Wire that array of numbers to the Write to Spreadsheet File.vi at the time you wish to save the data. If you do not wire a path to the file path input, a File DIalog will pop up asking where to save the data.
Lynn
05-31-2013 01:28 AM
Thanks Lynn. This helped me to clear my misunderstanding.