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:
I can not use functions for NI device

Subject: I can not use functions for NI device

From: mado

Date: 31 Jul, 2013 15:37:10

Message: 1 of 7

I found I can not use some functions when I tried to acquire data with ni product usb-6008.

for example,

s = daq.createSession('ni'),daq.getDevices,addAnalogInputChannel.

I can not use them, the error is: Undefined variable "daq" or class "daq.createSession". Undefined function or variable 'daq'.and so on.

Subject: I can not use functions for NI device

From: Steven_Lord

Date: 1 Aug, 2013 01:24:58

Message: 2 of 7



"mado " <elec_mnf@yahoo.com> wrote in message
news:ktbav6$295$1@newscl01ah.mathworks.com...
> I found I can not use some functions when I tried to acquire data with ni
> product usb-6008.
>
> for example,
>
> s = daq.createSession('ni'),daq.getDevices,addAnalogInputChannel.
>
> I can not use them, the error is: Undefined variable "daq" or class
> "daq.createSession". Undefined function or variable 'daq'.and so on.

That suggests you don't have Data Acquisition Toolbox installed (which you
can check using the VER function) or that you have a version of Data
Acquisition Toolbox that predates the addition of those functions.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: I can not use functions for NI device

From: mado

Date: 1 Aug, 2013 10:21:12

Message: 3 of 7

no , it's installed

Subject: I can not use functions for NI device

From: mado

Date: 1 Aug, 2013 10:29:10

Message: 4 of 7

Data Acquisition Toolbox Version 2.16 (R2010a)

Subject: I can not use functions for NI device

From: Eric Keller

Date: 1 Aug, 2013 12:52:07

Message: 5 of 7

"mado " <elec_mnf@yahoo.com> wrote in message <ktdd9m$7f1$1@newscl01ah.mathworks.com>...
> Data Acquisition Toolbox Version 2.16 (R2010a)

You need a more recent version of matlab, these calls weren't supported for most hardware in that version. The supported device list for NI devices can be found at teh following link:
https://www.mathworks.com/products/daq/supported/ni-daqmx.html

Subject: I can not use functions for NI device

From: mado

Date: 2 Aug, 2013 11:38:06

Message: 6 of 7



my version have daq toolbox however the functions are not existed when calling in command window , how could that be ?till now i didn't use any interface ( legacy or session) i just couldn't recall " daq " .

Subject: I can not use functions for NI device

From: Eric Keller

Date: 4 Aug, 2013 17:19:09

Message: 7 of 7

"mado " <elec_mnf@yahoo.com> wrote in message <ktg5mu$8d7$1@newscl01ah.mathworks.com>...
>
>
> my version have daq toolbox however the functions are not existed when calling in command window , how could that be ?till now i didn't use any interface ( legacy or session) i just couldn't recall " daq " .

With that version of matlab, you have to use the legacy interface.

Tags for this Thread

No tags are associated with 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