Home > Community > Discussion Forums

Multifunction DAQ

Showing results for 
Search instead for 
Do you mean 
Posts: 4

Trying to use matlab and a USB-6341



Matlab does not recognize the card. I am using the NiDaqMX driver 9.3 with simulink 2.18 control toolbox. It seems to me that this toolbox only works with the 9.1 MX  driver but my usb does not work with it. HELP please!

Posts: 108

Re: Trying to use matlab and a USB-6341

Hey jogarci,


DAQmx Tools was written for an older version of DAQmx that does not have support for X-series devices. 


You can learn more about DAQmx Tools here. There appears to be a page that lists the support for the software you have at that software's site.  It also confirms that it should support the USB-6341, so you may need to download the latest version of that.

Jake G.
National Instruments
Applications Engineer
Trusted Enthusiast
Posts: 2,684

Re: Trying to use matlab and a USB-6341

Hi jogarci,


The Data Acquisition Toolbox is developed and maintained by MathWorks--they offer support through their website.  According to their list of supported hardware, version 2.18 should support the USB-6341 (see here).


DAQmx Tools for Data Acquisition was written by National Instruments, but is no longer being maintained.



Best Regards,

John Passiak
Posts: 4

Re: Trying to use matlab and a USB-6341

hi jogarci,


seems i have the same problem. as john mentioned, the card should be supported. at the mathworks site, they say one should use driver 9.1 for data acquisition toolbox. but, again, i have the same probelem with 9.1. the box isn't even recognized by windows, e.g. when i open measurement &automatation, the prog doesn't recognize it (as opposed to 9.3). so, what to do ? maybe the nice guys from NI can give feedback to the nice guys at Mathworks ?


best regards, also to jake and john

Posts: 4

Re: Trying to use matlab and a USB-6341


sorry i forgot to mention in my above post we use win 7 64 bit; the NI-DAQmx driver requirement is documented on





Posts: 91

Re: Trying to use matlab and a USB-6341



The USB-6341 is supporting by Data Acquisition Toolbox.  What release of MATLAB are you using?  Currently, the USB devices are supported using 32-bit MATLAB using our legacy interface (commands like ANALOGINPUT).  If you are on maintenance, and have access to the R2011b prerelease, you can use either 32-bit or 64-bit MATLAB using the session based interface (commands like CREATESESSION).  You can install 32-bit MATLAB on 64-bit Windows, though it is not the default.


All the best,

-Rob Purser

Rob Purser
Manager, Test and Measurement
Posts: 4

Re: Trying to use matlab and a USB-6341

Hi everyone,


I did get the card to work with simulink using ver 2.18 of the DAQ toolbox. All I needed to to do was to run matlab as administrator and type the command "daqregister('nidaq')" and that did the trick. 


After talking to matlab tech they told me that the DAQ toolbox is not supported for the 64 bit version of matlab.


neuroMod if you want to run your USB-6341 you'll need to run the 32 bit version. I am using the 9.3 NI-DAQmx driver and downgraded to 32 bit matlab to make it run.


Posts: 4

Re: Trying to use matlab and a USB-6341

hi jogarci and rob,


thanks for all the hints so far. i installed the 32bit version and the 9.3 NI-DAQmx drivers. Windows (i.e. the "Measurement and Automation Explorer" by NI) recognizes the device. I started MATLAB as admin, and:


"v = daq.getVendors()

v =

Data acquisition vendor 'National Instruments':

            ID: 'ni'
      FullName: 'National Instruments'
AdaptorVersion: '2.18 (R2011a)'
 DriverVersion: '9.3 NI-DAQmx'
 IsOperational: true  "


this looks to me like anything is in place. But:


" daqregister('nidaq')

ans =

Unable to load adaptor: C:\MATLAB32\R2011a\toolbox\daq\daq\private\mwnidaq.dll.
Driver files or DLL for the specified adaptor could not be found or are not installed. "


this puzzles me because the dll is definitly there. I even tried to set a path to the directory but ML said it's not possible to set a path to a @ or a "private" directory.

any ideas, anyone ?


kind regards,









Posts: 4

Re: Trying to use matlab and a USB-6341

Matlab has to be run as an administrator for the "daqregister('nidaq')"  to work.

Right click on the matlab icon and select "run as administrator"

Maybe that is the problem

Posts: 4

Re: Trying to use matlab and a USB-6341

Sorry did not see you are running as admin. Sorry no other ideas. maybe try reinstalling NI MX drivers