Welcome! Log In Create A New Profile

Advanced

Buffer Overflow

Posted by TapasArakeri 
Buffer Overflow
November 24, 2021 04:22PM
I'm getting the following error typically after running a few trials:

Error using mldaq/MinSamplesAvailable (line 532)
NI_AITask::fetch_data:grinning smileyAQmxReadAnalogF64, The application is not able to keep up with the hardware acquisition.

Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading
all available samples might correct the problem.
Property: DAQmx_Read_RelativeTo
Corresponding Value: DAQmx_Val_CurrReadPos
Property: DAQmx_Read_Offset
Corresponding Value: 0

Task Name: nidaqmxDev1-AITask-593023081

Status Code: -200279

Error in ArcTarget_Static_runtime/end_trial (line 843)
while DAQ.MinSamplesAvailable<=ml_MinSamplesExpected

Error in ArcTarget_Static_runtime (line 1314)
end_trial();

Error in run_trial (line 130)
runtime(MLConfig,TrialRecord,TaskObject,TrialData);

Error in monkeylogic/UIcallback (line 869)
result = run_trial(MLConfig,datafile);

Error while evaluating UIControl Callback.

I have seen a previous post where the same error was experienced. However, after trying all the solutions suggested in the previous post- using a powerful CPU (Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz), using an older version of MATLAB and reducing the sampling rate on the ML app- the problem still exists. I have been using the same task on Monkey Logic for a while, but only recently (after the updates) started experiencing this problem. Please let me know if you have any other suggestions.

Thanks!
Attachments:
open | download - Capture.JPG (73.9 KB)
Re: Buffer Overflow
November 24, 2021 04:30PM
Here is another error (which might be related ) that I observe when I tried running the pacman task.

Index in position 1 exceeds array bounds (must not exceed 13552).

Error in pacman_script_runtime/end_trial (line 870)
TrialData.AnalogData.Joystick=JoyCal.sig2deg(DAQ.Joystick(ml_SamplePoint,smiling smiley,param_.JoyOffset);

Error in pacman_script_runtime (line 1224)
end_trial();

Error in run_trial (line 130)
runtime(MLConfig,TrialRecord,TaskObject,TrialData);

Error in monkeylogic/UIcallback (line 869)
result = run_trial(MLConfig,datafile);

Error while evaluating UIControl Callback.
Re: Buffer Overflow
November 25, 2021 05:43PM
First of all, reducing the sampling rate was not a solution suggested. It makes no change.

I uploaded a new package, so try it. It may not be helpful though. Then get a much better computer.
Re: Buffer Overflow
November 26, 2021 11:14AM
Thanks for the reply. Where can I download the new package from?
Re: Buffer Overflow
November 26, 2021 11:59AM
From the Download page. Uninstall what you installed and reinstall the newly downloaded package.
Re: Buffer Overflow
November 29, 2021 08:44PM
I tried the new package and running the task on an even faster CPU as you suggested, but the error still exists.

I found a page providing solutions for the same error seen in LabView: [knowledge.ni.com]. Although, I have no idea how to implement these solutions in Monkey Logic.

Please let me know if you have any other suggestions.

Thanks
Re: Buffer Overflow
November 30, 2021 05:09PM
NIMH ML is already programmed in consideration of those things that the page discusses.

I do not have enough information to determine the cause of your problem. It is your computer, so sit down and carefully check what slows down your computer.
Re: Buffer Overflow
December 01, 2021 04:44PM
Update: It seems the problem was the DAQ that I was using. Similar to the previous post, I too was using a USB 6001. The error occurred whenever the number of inputs was larger that 2. However, when I switched to a PCIe card, it worked just fine.
Re: Buffer Overflow
December 01, 2021 05:49PM
Thanks for the update. I did not notice that you guys used a USB-6001. Unfortunately I won't be able to address this issue until I get an actual USB-6001, because my USB-6002 and the USB-6001 simulated by the NI driver do not show this problem.
Re: Buffer Overflow
December 02, 2021 11:50AM
Hi,
I was the one with the similar problem in the previous post.
Can you tell me which PCIe card you used that solves the problem?
Thanks!
Re: Buffer Overflow
December 04, 2021 12:54PM
Hi,
I used a PCIe-6323. Based on Jaewon's post, I will also try the USB 6002 and let you know if that works as well.
Re: Buffer Overflow
July 12, 2022 01:44AM
I am testing with a USB-6001 but do not see any error yet.
Re: Buffer Overflow
July 25, 2022 01:23PM
That is interesting. I just tried running the simple free then hold task using the usb 6001 with three assigned inputs (eye_x, eye_y and photodiode), and got the same error as before. It works perfectly fine if I use only two inputs.
Re: Buffer Overflow
July 26, 2022 02:26PM
I ran all I/O channels available in USB-6001 (8 AI, 2 AO and 13 DIO) simultaneously but did not get any error. I think the problem is in the computer or USB controller.
Re: Buffer Overflow
July 27, 2022 02:30AM
I see. Thanks for the update.

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.