Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert data from Labview to Matlab

Hi,

I am new beginner in Labview.
I have done data acquitition from 8 physical channel PCMCIA Daq Card by labview 8.0, and
now, I want to save data from that acquitition in a file, and the file will be read and processed by matlab. 6.5 or later.

Is it posibble to be done? If yes, would you please explain to me, and could I get VI's examples about that function?

Thank you very much for your help before.

Best Regards



0 Kudos
Message 1 of 9
(6,314 Views)

Hello Maris,

 

There are a number of options available for writing data to a text file.  The easiest option would probably be to use the Write to Measurement File Express VI.  If you choose the LabVIEW Measurement File (.lvm) file type you can open this file as a text file.  However, if you need to access file options that aren't available in this express VI you can use the VI's located in the Programming» File I/O pallet.  I hope this helps, and if this doesn't meet your needs please feel free to post back with more information.

 

Cheers,

Brooks
0 Kudos
Message 2 of 9
(6,291 Views)

Hi Maris,

here is a knowledgebase article about it: http://digital.ni.com/public.nsf/websearch/562D29142BF79B4E862570D10074E3CC?opendocument&Submitted&&...

Hope it helps

Mike



Message Edited by MikeS81 on 05-16-2008 09:38 PM
0 Kudos
Message 3 of 9
(6,285 Views)
Hi Mike,

Thank you for your response.
I have tried your suggestion, but I still have error.
I use Write To Measurement File Express VI to save data in binary. After the Express VI function is run and than save the file, there is a message error. The message error is 'the object  refnum is invalid. the node that returned this renum might have encountered an error and did not return a valid refnum. The storage this refnum refers to might have closed before the call executed'.
What can I do? Would you please help me to solve my problem?

Best Regards
0 Kudos
Message 4 of 9
(6,247 Views)
Hi  Brooks,

Thank you for your response.
I have tried your suggestion, but I still have error.
I use Write To Measurement File Express VI to save data in binary. After the Express VI function is run and than save the file, there is a message error. The message error is 'the object  refnum is invalid. the node that returned this renum might have encountered an error and did not return a valid refnum. The storage this refnum refers to might have closed before the call executed'.
What can I do? Would you please help me to solve my problem?

Best Regards
0 Kudos
Message 5 of 9
(6,245 Views)

Hi Maris,

can you show your code? Did you try it with the example from the KB article?

Mike

0 Kudos
Message 6 of 9
(6,242 Views)
Hi Mike,

I have tried what the KB article is explaned, but it is not all. I just implement Vi to save the signal to binary file using Write To Measurement File Express VI. If it success, i will continue with convert the labview file to matlab file.

In my vi, I just connect signal from AI read(DAQmax Read (Analog ID Wfm BChan NSamp).vi  to signal parameter at
Write To Measurement File Express VI block diagram.

Thank you.

Best regards
0 Kudos
Message 7 of 9
(6,231 Views)
Hi Maris,
you can also use the "write waveforms to File.vi".
 
 
Hope it helps.
Mike


Message Edited by MikeS81 on 05-19-2008 01:32 PM
0 Kudos
Message 8 of 9
(6,229 Views)

Hello Maris,

 

Mike's solutions are also good.  In response to your question about the Write to Measurement File Express VI, you have the option of selecting a LVM (text) file in the top right of the Configure Write to Measurement File window.  To access this window just double click on the Express VI and you'll see this:

 

 

 

By selecting the LVM file type your data will be saved as text and not binary.  I hope this helps, and have a good day.

 

Cheers,



Message Edited by Brooks_C on 05-19-2008 08:23 AM
Brooks
Message 9 of 9
(6,220 Views)