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