Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to use matlab and a USB-6341

Hi

 

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!

0 Kudos
Message 1 of 11
(5,633 Views)

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.

Regards,
Jake G.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 11
(5,613 Views)

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
0 Kudos
Message 3 of 11
(5,603 Views)

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

0 Kudos
Message 4 of 11
(5,435 Views)

hi,

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

http://www.mathworks.com/help/toolbox/daq/rn/bstssaq-1.html#bsvvm3f-1

 

regards

 

0 Kudos
Message 5 of 11
(5,432 Views)

Hi,

 

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
MathWorks
rob.purser@mathworks.com
0 Kudos
Message 6 of 11
(5,429 Views)

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.

 

0 Kudos
Message 7 of 11
(5,423 Views)

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,

neuroMod

 

 

 

 

 

 

 

0 Kudos
Message 8 of 11
(5,389 Views)

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

0 Kudos
Message 9 of 11
(5,385 Views)

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

0 Kudos
Message 10 of 11
(5,382 Views)