Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to output data when converting labview vi into matlab mex functions

Hi,
I am a fairly new user to labview and am currently working on labview 7.1. I have created a labview vi which can extract data from ni daq 6070e in real time. The problem is that this code has to be converted so that it can be used with matlab.in order to do that i am using math interactive tool kit which converts the labview code into mex files which can then be used in matlab. Unfortunately i have not been able to figure out how to output this data so that it can be processed in matlab easily. i cannot afford any loss of information and all the output must happen in real time. the o/p must take place after the fft has been done. i am attaching the vi for convenience.There are 10 broken wires ,and this is the place where i want the o/p to be generated.
Also do let me know if this vi can be further improved.

Regards
0 Kudos
Message 1 of 4
(3,175 Views)
Manuj,
 
Thank you for contacting National Instruments.  In order to output the data from LabVIEW to Matlab using the Math Interface Toolkit, you have to make your data indicators an "output" for the LabVIEW VI.  You will want to put an indicator on each of the broken lines.  Now, you will have 10 array indicators.  Go to the front panel.  Right click on the icon in the upper right hand corner, and select show connector.  This will make the icon display the terminals as blocks.  You can then right click again, hover over patterns and choose your terminal pattern.  Then, you will left-click on one block in this connector and then left-click on one of your indicators.  This will assign that "node" of the terminal connector to that indicator.  The block should then take the color of the data type (orange in this case).  You will do this once for each indicator.  You can also assign input parameters to the VI in the same manner. 
 
Once you select the Math Interface Toolkit, all ten of these indicators will show up in the "outputs" tab of the wizard.  Now, you can specify these as outputs to the .MEX function call in Matlab.  For example,
 
[array1, array2, array3, array4,array5.....array10] = functionname(inputs)
 
Hope this helps!!!
 
Also, here is a link to a video demonstration on our website that will show you the movements that I am describing.
 
 
Happy Holidays!
-Jeff P.
0 Kudos
Message 2 of 4
(3,146 Views)
thanks jeffrey
sorted
0 Kudos
Message 3 of 4
(3,125 Views)

No problem!  Let us know if there is anything else we can do to help!
-Jeff P.
National Instruments Applications Engineer

0 Kudos
Message 4 of 4
(3,117 Views)