Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

MatLab for DAQ

alawrencealawrence Posts: 2Member
I am trying to use a NI-6025 controller for various testing applications at my company. Below is the code that I am trying to use for data acquisition:

ai = analoginput('nidaq','Dev1');
addchannel(ai,0);
ai;
start(ai)
wait(ai,2)
data = getdata(ai);
plot(data)

When I get to the 'start' command, however, I receive an error:

[color=Red]??? 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.

Error in ==> daqdevice.start at 62
start( daqgetfield(obj,'uddobject') );[/color]

I've restarted my computer to verify that nothing else could possibly be referencing the controller, and I've also verified on the Measurement and Automation Explorer that the device is free. Does anyone have any suggestions as how I could receive data from my controller? Your help is appreciated.

-Austin
Sign In or Register to comment.