MATLAB: Do I get a “The hardware you are trying to use is already reserved” error when starting an ANALOGINPUT object in Data Acquisition Toolbox 2.11 (R2007b)

.datdaqData Acquisition Toolbox

I receive the following error when starting a NI-DAQmx interface ANALOGINPUT object after starting an NI-DAQ Traditional interface ANALOGINPUT object corresponding to the same device.
Reproduction Code:
ai=analoginput('nidaq',1) % Use of Trad Nidaq
addchannel(ai,1)
start(ai)
a2=analoginput('nidaq','Dev4') % Use of NiDAQmx
addchannel(a2,1)
start(a2)
??? The hardware you are trying to use is already reserved, either by another object in this MATLAB session, or possibly by another application. To unreserve the device if held by this session of MATLAB or another MATLAB session, delete the object that may have it reserved, or run daqreset. As a last resort, use National Instrument's Measurement & Automation Explorer to reset the device.

Best Answer

Once you access a device from the Traditional NI-DAQ interface, it is reserved by Traditional NI-DAQ, and cannot be used by the NI-DAQmx interface.When the NI-DAQmx interface attempts to start the device, it is unable to reserve it, causing the error.
Use National Instrument's Measurement and Automation Explorer to reset the Traditional NI-DAQ device. Doing so will make it available under NI-DAQmx, as mentioned in the error message.
For more information, please see the following related Bug Report which discusses the same source of error: