LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i access labview files in matlab

Hello,

 

I am working on LabView(from last 2 weeks) and I simply want to know that how can I access the Labview files in Matlab? can some body just tell me in simple? or send me some example or tutorial about how to access the LabView file in matlab .

 

I shall be thanks full.

0 Kudos
Message 1 of 8
(3,817 Views)

Are you referring to output files? Like data files? If so, then you will need to be more specific. What kind of data? You could simply generate text files using the File I/O functions. You could also generate binary files. You could also use TDMS.

 

Alternatively, you could use the Matlab Script Node to call your Matlab code and pass the data directly to the node without writing it out to a file. 

0 Kudos
Message 2 of 8
(3,810 Views)

 Like when I use the Labview to acquire the data from the DAQ pci board then I get some files that can be data files and as I save them in text file then I will get just the binary numbers (as I attach the files aswell first two are from SE(signal express) and last one is from labview)  , I was wondering that how can i run that files in the MATLAB

 

and is it also possible to run the matlab code in Labview if yes then How ?

 

thanks

 

 

 

 

 

0 Kudos
Message 3 of 8
(3,803 Views)

I'm not sure what you mean by "running those files". Those are just text files, so you can just use Matlab's file I/O functions to read the files. That has nothing to do with LabVIEW. I am assuming you want to do this because you have some code on the Matlab side that you cannot run in LabVIEW. Otherwise, LabVIEW has lots of data processing and analysis functionality.

 

As far as running Matlab code inside of LabVIEW, you can use the Matlab Script Node.  Depending on what functions you're using you can probably use the Mathscript node instead.

0 Kudos
Message 4 of 8
(3,793 Views)

Dear smercurio_fc

 

Unfortunately I dont have the clear idea what you said in this replay about how I can genrate the binary files and what is the TDMS and how and why we use that (How we can benifit from the labview output files using Matlab?). But I just know to convert the Labview files in the text files format (as I sent you those as well ), yet. but  thanks for all these replies , I will try to read all these links which you suggest me to read,

 

If you can just give me these answers in simple, I hope it wil be beneficial for me to understand the things.

 

BR

0 Kudos
Message 5 of 8
(3,735 Views)
The Matlab Script Node and Mathscript node is not included in Labview Base. That may be the reason for that you do not have these functions


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 6 of 8
(3,723 Views)

Mubi wrote:

Dear smercurio_fc

 

Unfortunately I dont have the clear idea what you said in this replay about how I can genrate the binary files and what is the TDMS and how and why we use that (How we can benifit from the labview output files using Matlab?). But I just know to convert the Labview files in the text files format (as I sent you those as well ), yet. but  thanks for all these replies , I will try to read all these links which you suggest me to read,

 

If you can just give me these answers in simple, I hope it wil be beneficial for me to understand the things.

 

BR


I don't know what else you really want me to say. You have text files. You want to read them in Matlab. There's nothing to convert. Simply use the file functions in Matlab to read the files. I can't give a simpler answer than that because there's nothing more to it, and this has to do with Matlab programming, not LabVIEW.

 

The only reason I mentioned binary files or TDMS files is if you were dealing with large amounts of data. In this case text files can be very large, and saving the data as binary is more efficient. However, the files you uploaded are quite small. 

0 Kudos
Message 7 of 8
(3,714 Views)

Mubi,

 

your case is not difficult. Your best bet is to save your data as a spreadsheet file or convert the existing one into a spreadsheet file, then use the "read from spreadsheet file to get a vector , and use that as an input to your MATLAB node.

 

Though, you can also directly read from the text file, but more work will be needed.

 

I have attached a pic of what I am trying to tell you.

 

Perhaps, if you explain what your MATLAB will actually do, I can give you more detailed info.

0 Kudos
Message 8 of 8
(3,697 Views)