07-20-2011 11:46 PM
I am not sure I should post this question here.
finally, daqhwinfo in matlab can check usb-6251.
but when I wrote program, I found some functions are not available for my device.
for example, matlab often uses daq.createSession, addAnalogInputChannel,daq.getDevice and so on.
but the errors appear: Undefined variable "daq" or class "daq.createSession".or Undefined function or variable 'daq'.
what's the problem? some setting is not correct?
but I can use analoginput('nidaq','Dev1'), and addchannel (AI,1) is not available either.
I am confused on them
please help me, I appreciate it!
thank you
Solved! Go to Solution.
07-21-2011 08:00 AM
Hi Mike,
I would recommend asking MATLAB specific question in our forums - MATLAB Answers and make sure you select the right product.
For now, I believe you are confusing the two interfaces offered by the MathWorks - Legacy Interface and Session-based interface. Session-based interface is the new interface released in R2010b. Since you have R2010a, you would not have access to the Session-based interface.Commands like daq.createSession, daq.getDevices belong to Session-based interface.
Session-based interface offers advantages over the legacy interface:
- works with 64-bit MATLAB. So you would not need to install 32-bit MATLAB on your 64-bit Machine. ( in R2011a )
- supports NI CompactDAQ instruments
- supports specialized measurements
For your specific case, since you are using R2010b and your device is supported by legacy interface, I would recommend using the Legacy-based interface. If you can have a valid license, you can upgrade to the latest version of MATLAB to try our new Session-based interface.
Regards,
Manisha Singh
The MathWorks
02-13-2012 07:59 PM
I am using a USB 6008 with Windows 7, 64 bit, with Matlab R2011b, MatlabData Acquisition Toolbox 3.0.
I know that I will need to use a session based interface with Matlab. (Legacy does not work on 64 bit).
My question in this regard is: Is not there a loss of functionality for the USB now due to the fact that I cannot create a DIO object? My current code generates a DIO object and controls direction of a motor using the digital port.