Showing results for 
Search instead for 
Did you mean: 

NI LabVIEW Math Interface Toolkit - can you tell me about this ?


can anybody tell me about the

NI LabVIEW Math Interface Toolkit

Can I really use this toolkit to use "any" third-party Labview driver for third-party measurement/instrumentation hardware ( of Agilent, Measurement Computing,...) from Matlab ?
So that I can do data aquisition in Matlab ?

Do I need one  license for a development computer,
or do I need a license for any computer running matlab and doing data aquisition with this tool ?



0 Kudos
Message 1 of 8
The NI LabVIEW Math Interface Toolkit allows you to call LabVIEW VIs from Matlab. As LabVIEW allows you to communicate literally with almost every kind of hardware you can use this toolkit to integrate this hardware into Matlab.

Please have a look at this video and this document for more information.

You can use the LabVIEW application builder to create DLLs from your vis that use the LabVIEW Math Interface toolkit. Thus you only need a license for your development PC.

I hope that helps,

Jochen Klier
National Instruments Germany
Message 2 of 8
Thank you VERY much for the two links,
especially the video was very instructive.

So the video shows a 1-shot data aquisition,
so the labview generated DLL returns to Matlab before Matlab can process the data.

I need continous recording of low-frequent temperature data ( 10 Hz.. 1Hz.. 1/10 Hz) for a duration of up to 24 hours,
whiile the incoming data is already processed ( and  stored on harddisk ) and can be displayed
so I KNOW that Labview is ideal with its parallel processing :-),
but if the client wants Matlab... 😞

So there any means to do that with Matlab AND your "NI Labview Math Interface Toolkit" ?
So can the Labview-generated DLL send the data to Matlab while it is running ?

If the Labview-generated DLL can write to a file, this is not the solution because Matlab cannot open the file for reading while it is open for writing.
So is there any easy exchange possible by "another" DLL which can be used as queue to transfer data from Labview-generated DLL to Matlab ?

Btw, of course it is necessary to generate a Labview DLL which does not demand user action, so automatic start, automatic data aquisition, automatic close ( or even better: automatic data transfer to Matlab and continuing data aquisition ). From what I learned from the video, this automatic running is no problem, for 1-shot data aquisition ( but I need continous data aquisition ).

With Matlab itself, it is possible to do parallel processing of data aquisition and data processing by Event Handlers and Function Handles ( this is not as nice as with Labview, but as bad as with realtime systems, I was told).
But with 10 Hz, I cannot close the Labview generated DLL by Matlab to handle a portion of data...
Any idea ?

Does it help to solve the problem if the data aquisition hardware is by NI and uses DAQmx drivers with actvated "continous data aquisition" mode ( instead of using the 1-shot mode), so that I maybe can close the Labview-generated DLL by Matlab without loosing data  ?


Message Edited by hemmerling on 12-04-2006 11:10 AM

0 Kudos
Message 3 of 8

this is a good question and I can't do any testing as I don't have Matlab available here. Still I think there should be a way to acquire data continuously from a DAQ device. Here is the idea:

A typical continuous data acquisition program in LabVIEW looks like this:

If you want to use the same structure in Matlab you could create a subvi from the first three vis (configure and start task), a second subvi for DAQmx (without the loop) and a 3rd subvi for DAQmx Clear Then you could use the Math Interface Toolkit to import these three subvis into Matlab, call the first subvi in an initialization step, the second one in your continuous process to read data continuously and the third subvi in a wrap up state to stop the task.

Please note that you will have to use flatten to string and unflatten from string to be able to pass the task reference and the error cluster from one subvi to the next within Matlab (only numerics, strings and arrays are supported).

If for some reason this approach doesn't work I could think of a second approach with one vi doing continuous data acquisition and a second one that reads the data from the acquisition vis e. g. via queues or vi-server functions. The second vi could be called periodically from Matlab to pass the data to Matlab while the first one runs continuously.

I'm not 100% sure if the first approach works properly but it's a bit easier than the second one.
Maybe someone in this forum can approve or disprove it these approaches are feasible?

Best regards,

Jochen Klier
National Instruments Germany

Message Edited by Jochen on 12-05-2006 09:07 AM

0 Kudos
Message 4 of 8

I have Labview 2009 instaled and I want to to use math interface toolkits.

I have instaled math interface toolkits but when I am creating the mex file I recieve the following error:

At least one of the LNX-file creations was not successful. To call any of the successfully created LNX-files, XMath, the Math Interface Toolkit for XMath Run-Time, and version 9.0 of the LabVIEW Run-Time Engine must be installed.

It the matlab toolbox I also don't see the Ni math interface toolkits? (I am useig matlab 2010a)

Could you please tell me if this version of math interface toolkits is comaptibale to Labview 9 and what is the istalation procedure?

0 Kudos
Message 5 of 8

The Math Interface Toolkit is no longer maintained or sold by National Instruments. Starting with the 2009a version of MATLAB, the generated .MEX files are no longer supported by MATLAB, as they changed something in their interface API.


You wouldn't see anything in MATLAB from the Math Interface Toolkit. It is an add-on for LabVIEW that comipled LabVIEW VIs into a DLL with a .MEX interface. You can contact me directly ( if you have any additional questions about the Math Interface Toolkit.


0 Kudos
Message 6 of 8

Is the Math Interface Toolkit still available? If so, which versions of labview and matlab are supported?

0 Kudos
Message 7 of 8

Hi Gregg,


did you read Jeffrey's reply carefully? Btw. he's working at NI...


if you don't believe, what NI employees write you should just call your local NI representative. You can find it's phone number on this website! Smiley Wink

Best regards,

using LV2016/2019/2020 on Win8.1/10+cRIO
0 Kudos
Message 8 of 8