Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Reference trigger doesn't work

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));

0 Kudos
Message 1 of 4
(4,371 Views)

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

0 Kudos
Message 2 of 4
(3,303 Views)

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,

John Passiak
0 Kudos
Message 3 of 4
(3,289 Views)

Thanks, I found an alternative solution.

0 Kudos
Message 4 of 4
(2,575 Views)