Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI DAQmx 6739 error -200474 from DAQmxWriteAnalogF64 in C program on Linux

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! 

0 Kudos
Message 1 of 1
(115 Views)