How can I use the National Instruments USB-6212 and USB-6216 devices with the Data Acquisition Toolbox 2.12 (R2008a)?

18 views (last 30 days)
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).

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
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.

More Answers (1)

Gerome Manson
Gerome Manson on 24 Apr 2015
Hello All,
Just tried this edit with R2006a and Matlab version (R2006a) and it works for creating a digitialio with the NI 6216 board.

Products


Release

R2008a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!