Tag Archives: Ni-DAQ

NI-DAQ Matlab Toolbox

Ni DAQ for MATLAB Toolbox


This toolbox allows to perform data acquisition under Matlab (c) version 5 from Mathworks using the NiDAQ (c) library from National Instruments.

I wrapped a part of the NiDAQ library using H2MEX.

Continue reading

Not All the NiDAQ functions are wrapped. Only 155 functions of the library are wrapped to be called from Matlab.

Functions that perform asynchronous operations (like DAQ_Start) are not contained in this version of the toolbox.

We used this toolbox for 20 years with a AT-MIO-16X card under Windows 95 to control and collect measurement from an atomic clock.

If you want to compile the dll yourself get matwrap ou H2MEX and wrap the file  daq2.h (included in the toolbox) . This will generate the file daq2.cpp.

Compile it using the matlab mex utility:

>>mex -v daq2.cpp nidaq.lib


1) Unzip the distribution (daq.zip ) somewhere on your hard disk.

2) Add the directory mdaq to the matlab path .

3) Copy daq53vc.dll to daq2.dll if you are using Matlab5.3

or Copy daq50bc.dll to daq2.dll if you have Matlab [5.0 : .1: 5.2]

4) you may need to add the line:


to your startup.m (create a startup.m if you don’t have it).

Download daq.zip

This toolbox was written in 2000.