07-31-2025 03:28 PM
Hello, I am using the ni daqmx c library on linux debian 11. I am getting error -200474 Specified operation did not complete, because the specified timeout expired. Here is a snippet of my code:
dbScan is an array of 64 doubles that contains the data I want to write. I have based my implementation off of the VoltUpdate.c example provided by NI.
i32Error = DAQmxWriteAnalogF64( drvr_data_p->task_handle, //task handle
1, //number of samples
0, //auto start
0, //timeout (try once)
DAQmx_Val_GroupByChannel, //non-interleaved
dbScan, //array of doubles to write to channels
NULL, //samples per ch written
NULL ); //this is reserved for future use
if ( DAQmxFailed( i32Error ) )
{
DAQmxGetExtendedErrorInfo( sErrBuff, 2048 );
RTL_LOG_MSG( MSG_PRIO_ERR, "DAQmx AO Error in rtx_ni6739_daqmx_write: %s\n", sErrBuff );
drvr_data_p->error_no = NI6739_AO_LDV_DEVICE_WRITE_ERR;
adie_set_device_attr( WRITE_STATUS, "FAIL" );
return ADIE_FAIL;
}
This code executes every 100ms. It seems to happen after starting and stopping my program several times. The errors continue until the program is stopped and restarted. I am confused about the terminology in the error message that says the time out expired, because my timeout is set to 0 (try once). Any help would be greatly appreciated!