Filter löschen
Filter löschen

Set allow regeneration mode for acquisition NI session

1 Ansicht (letzte 30 Tage)
tomzooi am 1 Okt. 2015
Kommentiert: Hunter Davis am 12 Aug. 2020
I need to acquire data with a self-generated square wave which functions as trigger for the system. At the moment I get this error:
Error in main (line 40)
grid_dialog = makegrid(); %make menu with grid and get handle (makegrid.m)
> In C:\Program Files\MATLAB\R2013b\toolbox\daq\daq\+daq\+internal\BaseClass.p>BaseClass.notify at 91
In Session>Session.fireDataAvailableIfNeeded at 3780
In Session>Session.handleProcessAcquiredData at 2898
In StateAcquiredDataWaiting>StateAcquiredDataWaiting.processAcquiredData at 110
In Session>Session.processAcquiredData at 3398
In Session>Session.handleDataAvailable at 234
In AsyncIOInputChannel>AsyncIOInputChannel.handleDataAvailable at 135
In AsyncIOInputChannel>@(varargin)obj.handleDataAvailable(varargin{:}) at 57
In Channel>Channel.onDataReceived at 387
In Channel>@(source,data)obj.onDataReceived() at 312
In dialog at 88
In makegrid at 12
In main at 40
Warning: After the hardware reported stopping, it sent an additional error:
The generation has stopped to prevent the regeneration of old samples. Your application was unable to
write samples to the background buffer fast enough to prevent old samples from being regenerated.
To avoid this error, you can do any of the following:
1. Increase the size of the background buffer by configuring the buffer.
2. Increase the number of samples you write each time you invoke a write operation.
3. Write samples more often.
4. Reduce the sample rate.
5. If your data transfer method is interrupts, try using DMA or USB Bulk.
6. Reduce the number of applications your computer is executing concurrently.
In addition, if you do not need to write every sample that is generated, you can configure the
regeneration mode to allow regeneration, and then use the Position and Offset attributes to write the
desired samples.
Task Name: _unnamedTask<37>
Status Code: -200290
Where do I set this setting for enabling regeneration of data (hence, I don't need to queue this data every time with
s_NI.NotifyWhenScansQueuedBelow=size(triggerWaveForm,1); % The listener will be notified when the queued data is lower than the buffer size
lhO = addlistener(s_NI,'DataRequired', @dataRequired_callback);
every time
  1 Kommentar
Hunter Davis
Hunter Davis am 12 Aug. 2020
As of matlab 2020a, this is still a problem. It is a major limitation of the matlab DAQ controller. Can someone from mathworks address this? Given how old this post is, I have started a fresh question detailing my problem at

Melden Sie sich an, um zu kommentieren.

Antworten (0)


Mehr zu Data Acquisition Toolbox Supported Hardware finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by