Thread Subject: DAQ Timeout

Subject: DAQ Timeout

From: Jason

Date: 21 Jan, 2008 15:18:02

Message: 1 of 11

Hi there, I am running the following code using a NI
PXI-6713 analog output card:

a0 = analogoutput('nidaq','PXI1Slot2');
addchannel(a0,1);
addchannel(a0,0);
set(a0,'SampleRate',1000);
set(a0,'TriggerType','Manual');
data = a*ones(10,1);
data2 = b*ones(10,1);
putdata(a0,[data data2]);
start(a0);
trigger(a0);

I execute this for different values of a and b in a loop
changing from one to the other every 2 seconds using pause(2);

However after about ~170 iterations I get the following error:
??? NIDAQmx error : The specified resource is reserved. The
operation
could not be
completed as specified. Task Name: MWDAT0528 Status Code:
-50103

Error in ==> dc_test at 25
start(a0);

I probably need to put some wait handle or something because
I guess I am not buffering properly or something of the likes.
Anyone know what I might be doing wrong ?

Thanks,
Jason

Subject: DAQ Timeout

From: Rob Purser

Date: 21 Jan, 2008 18:38:01

Message: 2 of 11

You probably want a
wait(a0,2);

somewhere that will ensure that the output is complete
before attempting another one.

-Rob

Subject: DAQ Timeout

From: Rob Purser

Date: 21 Jan, 2008 18:38:02

Message: 3 of 11

Oh -- what version of MATLAB and Data Acquisition Toolbox?

-Rob

Subject: DAQ Timeout

From: Jason

Date: 22 Jan, 2008 15:26:02

Message: 4 of 11

"Rob Purser" <rob.purser@mathworks.com> wrote in message
<fn2oq9$7jc$1@fred.mathworks.com>...
> You probably want a
> wait(a0,2);
>
> somewhere that will ensure that the output is complete
> before attempting another one.
>
> -Rob

I did have a wait(a0,10) in there but commented it out,
still times out.
Any other point to note ?
Matlab Verssion 7.5
DAQ Version 2.11

Cheers

Subject: DAQ Timeout

From: Jason

Date: 22 Jan, 2008 15:31:07

Message: 5 of 11

"Jason " <jf203@ic.ac.uk> wrote in message
<fn2d3a$pmn$1@fred.mathworks.com>...
> Hi there, I am running the following code using a NI
> PXI-6713 analog output card:
>
> a0 = analogoutput('nidaq','PXI1Slot2');
> addchannel(a0,1);
> addchannel(a0,0);
> set(a0,'SampleRate',1000);
> set(a0,'TriggerType','Manual');
> data = a*ones(10,1);
> data2 = b*ones(10,1);
> putdata(a0,[data data2]);
> start(a0);
> trigger(a0);
>
> I execute this for different values of a and b in a loop
> changing from one to the other every 2 seconds using pause(2);
>
> However after about ~170 iterations I get the following error:
> ??? NIDAQmx error : The specified resource is reserved. The
> operation
> could not be
> completed as specified. Task Name: MWDAT0528 Status Code:
> -50103
>
> Error in ==> dc_test at 25
> start(a0);
>
> I probably need to put some wait handle or something because
> I guess I am not buffering properly or something of the likes.
> Anyone know what I might be doing wrong ?
>
> Thanks,
> Jason
>

Matlab 7.5
DAQ 2.11

Had wait(a0,10) in there before but commented it out because
it made no difference, i.e. communication still lost to NI DAQ

Subject: DAQ Timeout

From: Rob Purser

Date: 23 Jan, 2008 16:05:03

Message: 6 of 11

Do you have Traditional NI-DAQ installed? Typically, when
we see this message, it's related to that.

-Rob

Subject: DAQ Timeout

From: Jason

Date: 24 Jan, 2008 17:23:01

Message: 7 of 11

"Rob Purser" <rob.purser@mathworks.com> wrote in message
<fn7ojf$q34$1@fred.mathworks.com>...
> Do you have Traditional NI-DAQ installed? Typically, when
> we see this message, it's related to that.
>
> -Rob

If you mean by Traditional NI DAQMx or whatever it is
called, then yes I do. But if i remove that software then
obviously matlab doesnt recognize my NI card anymore!
Yesterday i got this error about every 30 minutes, and I was
writing new outputs every say 10 seconds.
Very wierd..

Subject: DAQ Timeout

From: Sherryl Radbil

Date: 24 Jan, 2008 18:18:03

Message: 8 of 11

"Jason " <jf203@ic.ac.uk> wrote in message
<fnahhl$j53$1@fred.mathworks.com>...
> "Rob Purser" <rob.purser@mathworks.com> wrote in message
> <fn7ojf$q34$1@fred.mathworks.com>...
> > Do you have Traditional NI-DAQ installed? Typically, when
> > we see this message, it's related to that.
> >
> > -Rob
>
> If you mean by Traditional NI DAQMx or whatever it is
> called, then yes I do. But if i remove that software then
> obviously matlab doesnt recognize my NI card anymore!
> Yesterday i got this error about every 30 minutes, and I was
> writing new outputs every say 10 seconds.
> Very wierd..
>

Hi Jason,
NI-DAQ comes in two versions.
Traditional NI-DAQ and NI-DAQmx.
You can see what you have installed in NI's Measurement and
automation explorer. Click on Help->System Information
Once you know what you have (one or the other, or both)
please see these links:
http://www.mathworks.com/support/bugreports/details.html?product=DA&rp=284483
http://www.mathworks.com/access/helpdesk/help/toolbox/daq/f5-54913.html

If you need to repost, could you include the NI section of
the output of the command DAQSUPPORT?
That may give more insight.
Sherryl

Subject: DAQ Timeout

From: Jason

Date: 28 Jan, 2008 14:57:02

Message: 9 of 11

Dear Sheryl,

NI-DAQmx 8.0.1f0


DAQSUPPORT output:

----------nidaq adaptor: ----------

 ----------Registering adaptor: nidaq ----------

Successfully registered nidaq adaptor

 ----------Adaptor Information for adaptor nidaq ----------


adaptorInfo =

           AdaptorDllName: [1x68 char]
        AdaptorDllVersion: '2.11 (R2007b)'
              AdaptorName: 'nidaq'
               BoardNames: {'PXI-6713'}
        InstalledBoardIds: {'PXI1Slot2'}
    ObjectConstructorName: {1x3 cell}


 ----------Adaptor DLL Name ----------

C:\Program
Files\MATLAB\R2007b\toolbox\daq\daq\private\mwnidaqmx.dll

 ----------Adaptor Name ----------

nidaq

 ----------Object Constructor Names ----------

analogoutput('nidaq','PXI1Slot2')
digitalio('nidaq','PXI1Slot2')

 ----------Additional Adaptor Information for adaptor nidaq
----------

NIDAQ Traditional is not installed.

 ----------Creating analogoutput('nidaq','PXI1Slot2') object
for adaptor nidaq ----------

Display Summary of Analog Output (AO) Object Using 'PXI-6713'.

       Output Parameters: 1000 samples per second on each
channel.

      Trigger Parameters: 1 'Immediate' trigger on START.

           Engine status: Waiting for START.
                           0 total sec. of data currently
queued for START.
                           0 samples currently queued by
PUTDATA.
                           0 samples sent to output device
since START.

AO object contains no channels.



ans =

                AdaptorName: 'nidaqmx'
                       Bits: 12
                 ChannelIDs: [0 1 2 3 4 5 6 7]
                   Coupling: {'DC'}
                 DeviceName: 'PXI-6713'
                         ID: 'PXI1Slot2'
              MaxSampleRate: 1000000
              MinSampleRate: 0.6000
             NativeDataType: 'double'
               OutputRanges: [-10 10]
                   Polarity: {'Bipolar'}
                 SampleType: 'SimultaneousSample'
              SubsystemType: 'AnalogOutput'
              TotalChannels: 8
    VendorDriverDescription: 'National Instruments NIDAQmx
driver'
        VendorDriverVersion: '8.0'


 ----------Creating digitalio('nidaq','PXI1Slot2') object
for adaptor nidaq ----------

Display Summary of DigitalIO (DIO) Object Using 'PXI-6713'.

         Port Parameters: Port 0 is port configurable for
reading and writing.
                           
           Engine status: Engine not required.

DIO object contains no lines.



ans =

                AdaptorName: 'nidaqmx'
                 DeviceName: 'PXI-6713'
                         ID: 'PXI1Slot2'
                       Port: [1x1 struct]
              SubsystemType: 'DigitalIO'
                 TotalLines: 8
    VendorDriverDescription: 'National Instruments NIDAQmx
driver'
        VendorDriverVersion: '8.0'

Subject: DAQ Timeout

From: Sherryl Radbil

Date: 28 Jan, 2008 15:32:02

Message: 10 of 11

Hi Jason,
Thanks for including the DAQSUPPORT. It does not show
anything glaringly wrong.

Have you ever run this program in a release prior to R2007b?
If yes, did it run correctly?
If no, is there any way you could easily try R2007a or R2006b?

Also, I see you only have 1 device on this PC, but if you
have other PC's with other devices and know if it happens
with other devices I'd be interested to know that too.

Sherryl

Subject: DAQ Timeout

From: Jason

Date: 28 Jan, 2008 16:50:17

Message: 11 of 11

"Sherryl Radbil" <sherryl.radbil.dontspamme@mathworks.com>
wrote in message <fnkshi$o70$1@fred.mathworks.com>...
> Hi Jason,
> Thanks for including the DAQSUPPORT. It does not show
> anything glaringly wrong.
>
> Have you ever run this program in a release prior to R2007b?
> If yes, did it run correctly?
> If no, is there any way you could easily try R2007a or R2006b?
>
> Also, I see you only have 1 device on this PC, but if you
> have other PC's with other devices and know if it happens
> with other devices I'd be interested to know that too.
>
> Sherryl
>
Ive tried it with R2007a. Same problem. Basically if I
change the voltage on my outputs (as outlined in the initial
post) after about 30 minutes I get the timeout error. It is
very weird because I dont think that I'm doing anything
wrong, it seems more to be a bug of some sort.
Thanks,
Jason

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
data acquisition Rob Purser 21 Jan, 2008 12:56:15
hardware Rob Purser 21 Jan, 2008 12:56:15
ni Jason 21 Jan, 2008 10:20:12
trigger Jason 21 Jan, 2008 10:20:12
wait Jason 21 Jan, 2008 10:20:12
timeout Jason 21 Jan, 2008 10:20:12
daq Jason 21 Jan, 2008 10:20:11
rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com