MATLAB: How to use the National Instruments USB-6212 and USB-6216 devices with the Data Acquisition Toolbox 2.12 (R2008a)

62126216Data Acquisition Toolboxm-seriesusb

The National Instruments boards USB-6212 and USB-6216 are M-Series data acquisition (DAQ) devices for USB that deliver faster sampling rates and more digital I/O features than previously released bus-powered M Series devices for USB. I would like to use these boards with the Data Acquisition Toolbox 2.12 (R2008a).

Best Answer

This enhancement has been incorporated in Release 2008b (R2008b). For previous product releases, read below for any possible workarounds:
The Data Acquisition Toolbox software does not support the National Instruments USB-6212 and USB-6216 boards.
From version 2.12 (R2008a) onwards of the Data Acquisition Toolbox software, you can manually add support for these devices as follows:
1. Exit the MATLAB environment.
2. Find the following file:
$MATLABROOT\toolbox\daq\daq\private\mwnidaqmx.ini
where $MATLABROOT is the MATLAB root installation directory obtained by issuing:
matlabroot
at the MATLAB Command Prompt.
3. Make a copy of this file and rename it to mwnidaqmx.ini.old.
4. Open the file mwnidaqmx.ini in a text editor, and add the following lines at the end of the file:
[USB-6212]
hasAnalogInput = true
numAIChannels = 16
hasAnalogOutput = true
numAOChannels = 2
maxAOSampleRate = 250000,250000
minAONumSamples = 2
hasDigitalIO = true
digitalPortSize = 16,8,8
digitalPortCap = 4,4,4
[USB-6216]
hasAnalogInput = true
numAIChannels = 16
hasAnalogOutput = true
numAOChannels = 2
maxAOSampleRate = 250000,250000
hasDigitalIO = true
digitalPortSize = 16,8,8
digitalPortCap = 4,4,4
5. Save the file mwnidaqmx.ini and restart MATLAB.
You cannot work around this issue if you are using versions earlier than 2.12(R2008a) of the Data Acquisition Toolbox software.