Hi all,
I need to acquire a finite amount of samples at each rising edge of the signal trigger coming from PFI0 of a PXI 6115 board.
This is the code:
int checkError(int code)
{
if(DAQmxFailed(code)){
char err_string[2048];
qDebug() << code;
DAQmxGetErrorString (code, err_string, ERR_STRING_MAX_SIZE);
qDebug() << QString(err_string);
}
return code;
}
TaskHandle handle;
int daqmx_ret = DAQmxCreateTask("MYTASK",&handle);
checkError(daqmx_ret);
daqmx_ret = DAQmxCreateAIVoltageChan(handle,
"PXI1Slot4/ai0",
"", //Name to assign to channel
DAQmx_Val_Cfg_Default, //Terminal config
-10,
10,
DAQmx_Val_Volts, //Units
nullptr);
checkError(daqmx_ret);
daqmx_ret = DAQmxCfgSampClkTiming(handle,
"",
1000000,
DAQmx_Val_Rising,
DAQmx_Val_FiniteSamps,
10000);
checkError(daqmx_ret);
daqmx_ret = DAQmxCfgDigEdgeStartTrig(handle,"/PXI1Slot4/PFI0",DAQmx_Val_Rising);
checkError(daqmx_ret);
daqmx_ret = DAQmxSetStartTrigRetriggerable(handle,1);
checkError(daqmx_ret);
But I received the following error when the DAQmxSetStartTrigRetriggerable function was invoked:
-200452 "Specified property is not supported by the device or is not applicable to the task."
What's the error?