02-24-2009 11:54 AM
Hi,
The 200016 buffer underrun has earlier been reported on ASUS PK5-SE and P5LD2-SE motherboards as long ago as Feb, 2006:
http://forums.ni.com/ni/board/message?board.id=250&message.id=19597&requireLogin=False
http://forums.ni.com/ni/board/message?board.id=250&thread.id=34384
In the fall of 2007 I reported this 200016 ERROR on MAX and my software to NI UK support, and they said that the problem was due to the ASUS motherboards, and was not an NI problem.
Unfortuantely one of my external users in Japan has found the same problem on an Intel Extreme Series motherboard, and the error occurred during an Internal Software Trigger Start rather than External Trigger Start. His computer is made up of the following parts:
Intel DP45SG Extreme Series motherbord with an Intel P45 chipset and an LGA775 socket
Intel Core 2 Duo Processor E7300 / 2.66GHz / FSB 1066MHz / L2cache 3MB
SAPPHIRE Radeon HD4650 video card
Windows XP
NI PCI-6229 M-SERIES board
NI-DAQmx version 8.7.1
He found that the 200016 error also occurs with Internal Software Trigger Start in
Measurement and Automation Explorer (MAX) at AnalogOutput rates at 40KHz but not at 10KHz
my small Visual C 6.0 program (VC_ContIO_40khz_2AO_DO_5AI_200016.exe and source code included as an attachment)
Therefore, this 20016 error occurs in MAX and is now DEFINATELY A PROBLEM on Extreme Intel motherboards.
Recently, Anderw S of NI has found a solution to the 200016 error with External Trigger Start for LabView with the hope that this error fix with be incorporated into a future version of NI-DAQmx:
http://forums.ni.com/ni/board/message?board.id=250&message.id=45659&jump=true#M45659
In your solution for the 200016 error on ASUS and now Extreme Intel motherboards, would you please:
1) implement a DAQmx solution for Internal Software Trigger Start as well as External Hardware Trigger Start and
2) incorporate this solution into NI-DAQmx as soon as possible.
Also, I have included a Visual C demo program (VC_ContIO_40khz_2AO_DO_5AI_200016.exe with source code) using Internal Software Trigger Start which captures the 200016 error containing the following software start code in case this is any help:
DAQmxErrChk (DAQmxStartTask(hAOtask));
DAQmxErrChk (DAQmxStartTask(hDOtask));
DAQmxErrChk (DAQmxStartTask(hAItask));
and this code which catches the 200016 buffer underrun error on an Intel Extreme motherboard
DAQmxErrChk (DAQmxIsTaskDone(hAOtask, isTaskdone)); // catches status code error -200016 on Intel motherboard
NOTE: In the code I by mistake mentioned 200018 rather than the correct 200016 error, and the Japanese user replaced the ASUS HDMI video card with a SAPPHIRE Radeon HD4650 video card for this testing so no ASUS equipment is in the Japanese test machine.
Thank you.
Sincerely,
Bill Anderson
Solved! Go to Solution.
02-24-2009 01:28 PM
HI Bill,
This issue will be worked around in a future version of DAQmx. I would also like to point out that you do not have to use an external triggger to implement the code I posted on the other forum. AO always has a start trigger internally so if you add:
DAQmxSetStartTrigDelayUnits(taskHandleAO ,DAQmx_Val_Seconds);
DAQmxSetStartTrigDelay(taskHandleAO, .001);
before you start the AO task that should work as well. To be safe you may want to increase that delay buy it worked on the system I reproduced on.
thanks,
Andrew S
02-25-2009 07:00 AM
Hi Andrew S,
Thank you very much for your quick reply and solution. I just have two more questions before I put the code in because my test
computer showing the 200016 error is in Japan, not on site.
1) Since I am simultaneously starting a DigitalOutput task (hDOtask) and an AnalogInput task (hAItask) at the same time
as my AnalogOutput task (hAOtask), is it also necessary put in DAQmxSetStartTrigDelayUnits() and DAQmxSetStartTrigDelay()
code for my DigitalOutput and AnalogInput tasks. Note that the AnalogOutput task uses the OnboardClock, and the other tasks
use the ao/SampleClock.
2) When I start the tasks, is it a good idea, or necessary, to start the AnalogOutput task last?
Thank you.
PS I have included the important code fragments from my VC_ContIO_40khz_2AO_DO_5AI_200016.exe program with the new code added along with my questions.
int main()
{
TaskHandle hAOtask=0;
TaskHandle hDOtask=0;
TaskHandle hAItask=0;
// Configure Analog Output
DAQmxErrChk( DAQmxCreateTask("",&hAOtask) );
DAQmxErrChk( DAQmxCreateAOVoltageChan(hAOtask,"Dev1/ao0:1","",-10.0,10.0,DAQmx_Val_Volts,NULL) );
DAQmxErrChk( DAQmxCfgSampClkTiming(hAOtask,
"OnboardClock", // AnalogOutput uses onboard clock
40000.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,40000) );
// Configure Digital Output
DAQmxErrChk( DAQmxCreateTask("",&hDOtask) );
DAQmxErrChk( DAQmxCreateDOChan(hDOtask,"/Dev1/port0","",DAQmx_Val_ChanForAllLines) );
DAQmxErrChk( DAQmxCfgSampClkTiming(hDOtask,
"/Dev1/ao/SampleClock", // DigitalOutput uses AnalogOutput clock
40000.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,40000) );
// Configure Analog Intput
DAQmxErrChk( DAQmxCreateTask("",&hAItask) );
DAQmxErrChk( DAQmxCreateAIVoltageChan(hAItask,"Dev1/ai0:4","",DAQmx_Val_RSE,-10.0,10.0,DAQmx_Val_Volts,NULL) );
DAQmxErrChk( DAQmxCfgSampClkTiming(hAItask,
"/Dev1/ao/SampleClock", // AnalogInput uses AnalogOutput clock
40000.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,4000) );
// DAQmx Pre-Start Code
DAQmxErrChk( DAQmxSetStartTrigDelayUnits(hAOtask ,DAQmx_Val_Seconds) ); // new code
DAQmxErrChk( DAQmxSetStartTrigDelay(hAOtask, .001) ); // new code
DAQmxErrChk( DAQmxSetStartTrigDelayUnits(hDOtask ,DAQmx_Val_Seconds) ); // new code, IS THIS NECESSARY ?
DAQmxErrChk( DAQmxSetStartTrigDelay(hDOtask, .001) ); // new code, IS THIS NECESSARY ?
DAQmxErrChk( DAQmxSetStartTrigDelayUnits(hAItask ,DAQmx_Val_Seconds) ); // new code, IS THIS NECESSARY ?
DAQmxErrChk( DAQmxSetStartTrigDelay(hAItask, .001) ); // new code, IS THIS NECESSARY ?
// DAQmx Start Code
DAQmxErrChk( DAQmxStartTask(hAItask) );
DAQmxErrChk( DAQmxStartTask(hDOtask) );
DAQmxErrChk( DAQmxStartTask(hAOtask) ); // DOES STARTING hAOtask HAVE TO BE PUT LAST ?
// Catching -200016 error
DAQmxErrChk( DAQmxIsTaskDone(hAOtask, isTaskdone) ); // catches status code error -200016 on ASUS and Intel Extreme motherboards
Error:
if( DAQmxFailed(error) )
{
DAQmxGetExtendedErrorInfo(errBuff,2048);
printf("main(), DAQmx Error: %s\n", errBuff);
}
}
02-25-2009 08:17 AM
Hi Andrew S,
Disregard the last question.
This compiled and ran fine. (I will let you know if this solves the -200016 problem in the Intel Extreme motherboard.)
DAQmxErrChk (DAQmxSetStartTrigDelayUnits(hAOtask ,DAQmx_Val_Seconds));
DAQmxErrChk (DAQmxSetStartTrigDelay(hAOtask, 0.001));
This compiled BUT DID NOT RUN, it produced error -200452
DAQmxErrChk (DAQmxSetStartTrigDelayUnits(hDOtask ,DAQmx_Val_Seconds)); // Cant use, got Error -200452
DAQmxErrChk (DAQmxSetStartTrigDelay(hDOtask, 0.001));
This compiled BUT DID NOT RUN, it produced error -200436
DAQmxErrChk (DAQmxSetStartTrigDelayUnits(hAItask ,DAQmx_Val_Seconds)); // Cant use, got Error -200436
DAQmxErrChk (DAQmxSetStartTrigDelay(hAItask, 0.001));
Thank you.
Bill Anderson
02-25-2009 11:42 AM
Hi Everyone --
I just wanted to echo the comment that this problem does not seem to be confined to a single brand or style of motherboard. I have noticed pretty much exactly the same problem (typically I see error 200018, but I also get 200016) on a new, Dell Precision T5400 with an Intell quad core Xeon processor. My thread can be found here
http://forums.ni.com/ni/board/message?board.id=250&thread.id=46429
Of course, the answer I got to my problem was that my board was defective. Clearly, I think this is not the case. The problem is with daqmx and the way that it sends interrupts.
I have not tried this delayed output solution mentioned above, but I will give it a try and see if it helps. Of course, it would be better if NI would come up with a more permanent solution ...
Cheers,
Paul
02-26-2009 10:15 AM
Hi Andrew S,
YOUR FIX WORKS!!! My Visual C demo program with your changes added in works fine on the Intel Extreme motherboard, and my C++Builder program works fine on the Intel Extreme Motherboard, and also on the ASUS P5xxx motherboard.
Many Thanks,
Bill Anderson