‎05-18-2014 02:45 AM
I am using PCIe-6351 card to acquire three pressure signals. The transducers output 4~20mA current signals and I use the precision resistors to get the voltage signals, range from 1~5V.
I connected one pressure signal both to AI0/AI8, and APFI0/AIGND. The trigger level set to 1.5volts. I use the start trigger and reference trigger mode. The start trigger works, but I always get trigger timeout error when I enable the reference trigger fuction. I think the trigger doesn't work.
the sample rate: 1kHz,
samples perchannel: 5000
pretrigger samles: 1000
Can anyone give the hints what is the root cause? Thanks.
The DAQmx source code is here:
/*********************************************/
// DAQmx Configure Code
/*********************************************/
SetWaitCursor(1);
DAQmxErrChk (DAQmxCreateTask("",&aiPressureTaskHandle));
DAQmxErrChk (DAQmxCreateAIVoltageChan (aiPressureTaskHandle, pData->aiPressureChan, "", DAQmx_Val_Diff, pData->min, pData->max, DAQmx_Val_Volts, NULL));
DAQmxErrChk (DAQmxCfgSampClkTiming (aiPressureTaskHandle, "", pData->sampsRate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, pData->sampsPerChan));
DAQmxErrChk (DAQmxCfgDigEdgeStartTrig (aiPressureTaskHandle, "/mio6351/PFI15", DAQmx_Val_Rising));//Pump on signal trigger the data acquisition.
//DAQmxErrChk( DAQmxCfgDigEdgeRefTrig (aiPressureTaskHandle, "/mio6351/PFI0", DAQmx_Val_Rising, pData->preTrigSamps));
DAQmxErrChk (DAQmxCfgAnlgEdgeRefTrig (aiPressureTaskHandle, "APFI0", DAQmx_Val_RisingSlope, pData->pressureThreshold, pData->preTrigSamps));
//DAQmxCfgAnlgWindowRefTrig (aiPressureTaskHandle, "mio6351/ai0", DAQmx_Val_EnteringWin, 4, 1.3, pData->preTrigSamps);
DAQmxErrChk (DAQmxGetTaskAttribute(aiPressureTaskHandle,DAQmx_Task_NumChans,&(pData->numChannels)));
if( (data=malloc(pData->sampsPerChan * pData->numChannels*sizeof(float64)))==NULL ) {
MessagePopup("Error","Not enough memory");
goto Error;
}
/*********************************************/
// DAQmx Start Code
/*********************************************/
DAQmxErrChk (DAQmxStartTask(aiPressureTaskHandle));
PumpControl( ON );
/*********************************************/
// DAQmx Read Code
/*********************************************/
DAQmxErrChk (DAQmxReadAnalogF64(aiPressureTaskHandle,-1,10.0,0,data,pData->sampsPerChan * pData->numChannels,&numRead,NULL));
‎05-09-2015 05:40 PM
Does anyone know how to do this? I'm trying to use the
myTask.Triggers.ReferenceTrigger.ConfigureAnalogEdgeTrigger
method with my USB-6211 M-series board
‎05-11-2015 11:50 AM
The 6211 doesn't support analog triggering, only digital.
As for the original post, I can only assume his signal didn't cross the trigger level--by default using a reference trigger changes the read behavior to read relative to the "first pretrigger sample", so if the trigger signal is not detected then the read will simply timeout.
Best Regards,
‎11-30-2017 09:54 AM
Thanks, I found an alternative solution.