Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
NIDAQ USB-6009

Subject: NIDAQ USB-6009

From: Ryan

Date: 7 Jun, 2010 22:11:04

Message: 1 of 10

Hi. I'm having trouble using the Data Acquisition Toolbox to collect data using a NIDAQ USB-6009. With the command,

ai = analoginput('nidaq','Dev1');

 I receive the error message,

Error using ==> analoginput.analoginput at 99
Error using ==> analoginput.analoginput>localCreateAnalogInputObject at 191
Failure to find requested data acquisition device: nidaqmx.

Here are the software versions that I'm running:
Matlab R2007a
Data Acquisition Toolbox 2.10
NIDAQmx driver: 9.0.2f0

Using the command,

daqregister('mwnidaqmx')

I receive the error message,

'nidaqmx.dll' not found. Make sure it is on the MATLAB path.

I'm sure that the 'nidaqmx.dll' file exists, and I've tried entering the entire filepath instead of just the filename. I've opened the mwnidaqmx.ini file in a text editor and have seen that the USB-6009 DAQ is listed, along with its properties. Using the command,

daqhwinfo('nidaqmx') or daqhwinfo('nidaq')

gives the following error message:

Error using ==> daqhwinfo at 98
Failure to find requested data acquisition device: nidaqmx.

I've used the daq to successfully collect data using LabView. Any help would be much appreciated. Thanks

Subject: NIDAQ USB-6009

From: Megan

Date: 12 Jul, 2011 13:50:25

Message: 2 of 10

Hi Ryan,

Did you ever find a solution to this? I'm having the same problem.

Thanks,

Megan

Subject: NIDAQ USB-6009

From: Rob Purser

Date: 12 Jul, 2011 17:24:10

Message: 3 of 10

Are you running on Vista or Windows 7? you may have a UAE issue. Launch MATLAB in administrator mode, and then do daqregister('nidaq')

-Rob

Subject: NIDAQ USB-6009

From: Nick

Date: 19 Aug, 2011 10:14:09

Message: 4 of 10

"Rob Purser" <rob.purser@mathworks.com> wrote in message <ivhvvq$l1n$1@newscl01ah.mathworks.com>...
> Are you running on Vista or Windows 7? you may have a UAE issue. Launch MATLAB in administrator mode, and then do daqregister('nidaq')
>
> -Rob

Hi there Rob,

I too have this problem. I have a PC running Windows 7 and I am running MATLAB 2011a from a network licence. We have the Data Aquisition Toolbox ver. 2.18. I have read a few of your posts on this topic and have tried the following:
- Opening Matlab as an Administrator
- Typed daqreset, and then daqregister('nidaq'), (I have also tried to register the sound card, daqregister('winsound')), and the same error message appears:
'nidaq.dll' not found. Make sure it is on the MATLAB path.
- Tried reinstalling the Data Acquisition Toolbox
- Tried reinstalling Matlab 2011a

One other thing. After first installing 2011a, I could not even start a session;
s = daq.createSession('ni')
After contacting support I was advised to set my File Path settings to Default. After doing this, the Data Acquisition Toolbox suddenly became visible and I could use the basic commands. However, now I cannot see any devices, (i.e. using:
daq.getDevices)

Any ideas?

Nick

Subject: NIDAQ USB-6009

From: Rob Purser

Date: 19 Aug, 2011 16:21:10

Message: 5 of 10

Are you running 32-bit or 64-bit MATLAB? 64-bit Windows 7?

Can you send the text of the error messages you're getting?

Do you have NI-DAQmx installed? What version?

Can you see your devices in M&A Explorer?

-Rob

Subject: NIDAQ USB-6009

From: Garrison

Date: 9 Sep, 2011 18:03:27

Message: 6 of 10

"Rob Purser" <rob.purser@mathworks.com> wrote in message <j2m2hm$hvb$1@newscl01ah.mathworks.com>...
> Are you running 32-bit or 64-bit MATLAB? 64-bit Windows 7?
>
> Can you send the text of the error messages you're getting?
>
> Do you have NI-DAQmx installed? What version?
>
> Can you see your devices in M&A Explorer?
>
> -Rob

I'm having similar troubles communicating with a NI USB-6229 box. I have 64 bit Win 7 with 64 bit MATLAB 2011a. I have NI M&A Explorer version 4.8.0f0. I can see the device in M&A and run test and get expected voltages out of the box.

Within MATLAB I can daq.getVendors to get:
Data acquisition vendor 'National Instruments':

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

But when I daq.getDevices I receive:

ans =

No data acquisition devices available.

Please help,

Also is there a guide or tutorial any where of how to use the session-based interface with Simulink? I'm sure there are ways to use a MATLAB function block and write a user made function but it seems strange to make a user function where a session is created, data put onto a channel and then data sent all within one use function that will run with each (fixed) time step of the Simulink execution.

Thank you for any help you may provide.

Subject: NIDAQ USB-6009

From: Rob Purser

Date: 9 Sep, 2011 20:26:10

Message: 7 of 10

> I'm having similar troubles communicating with a NI USB-6229 box. I have 64 bit Win 7 with 64 bit MATLAB 2011a. I have NI M&A Explorer version 4.8.0f0. I can see the device in M&A and run test and get expected voltages out of the box.

Support for these devices in 64-bit MATLAB was added in R2011b. You'll need to install that.

On Simulink, the session based interface is not accessible at this time. You'll need to install 32-bit MATLAB on 64-bit Windows to have the Simulink interface work.

All the best,
-Rob

Subject: NIDAQ USB-6009

From: lobo_20

Date: 21 Dec, 2011 19:52:07

Message: 8 of 10

Hello everyone

I'm having the same problem and would like to hear any suggestions you have.

I'm running matlab 2011a on a windows 7 64 bit machine, NI MAX version 5.0.0f1 is installed and i'm using a NI USB-6009; testing the device on MAX gives me a clean performance.

When I type daq.getDevices I get

ans =

No data acquisition devices available.

I typed daq.getVendors and got

ans =

Data acquisition vendor 'National Instruments':

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

I referred to the troubleshooting tips and tried all of those (verifying the device in NI MAX, reinstalling the toolbox) to no avail.
I've tried running matlab with admin privileges and typing daqregister('nidaq') with the following results

>> daqregister('nidaq')

ans =

'nidaq.dll' not found. Make sure it is on the MATLAB path.

Am I missing something? I hope you guys can help me, right now all i can think of is getting myself a 32-bit machine and work with that.

Thanks to all of you for your attention.

Subject: NIDAQ USB-6009

From: Garrison

Date: 21 Dec, 2011 21:00:09

Message: 9 of 10

To get the NI boxes to work with Simulink I had to use a 32-bit version of MATLAB/Simulink. If you are planning to use the box just through MATLAB your configuration should work, I used one similar.

What do you get when you run the command:
daqhwinfo('nidaq');

Subject: NIDAQ USB-6009

From: lobo_20

Date: 22 Dec, 2011 18:17:08

Message: 10 of 10

"Garrison " <g.lindholm@gmail.com> wrote in message <jcthcp$31f$1@newscl01ah.mathworks.com>...
> To get the NI boxes to work with Simulink I had to use a 32-bit version of MATLAB/Simulink. If you are planning to use the box just through MATLAB your configuration should work, I used one similar.
>
> What do you get when you run the command:
> daqhwinfo('nidaq');

thanks for answering!

When i run daqhwinfo('nidaq') I get an error message:

>> daqhwinfo('nidaq')
??? Error using ==> daqhwinfo at 42
To learn about using data acquisition devices on the win64 platform, see
the documentation on the session-based interface.

since i'm using a 64-bit windows i can't use the legacy interface: analoginput, analogoutput and so.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us