Doug,
Thanks this has been a great help. I am using the Digital Pattern Recognition Start Trigger, and there doesn't seem to be any sample code showing how to do this (or am I missing it?). Here is my bit of code that works, except for the start trigger part.
I'm sending the trigger pattern over the ports (it's a 32 bit pattern across "Dev1/port0:3") but the task times out, so I am not sure what is wrong.
/*********************************************/
/*/ DAQmx Configure Code
/*********************************************/
DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
DAQmxErrChk (DAQmxCreateDIChan(taskHandle,"Dev1/port0:3","",DAQmx_Val_ChanForAllLines));
DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"/Dev1/PFI2",20000.0,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,arraySize));
DAQmxErrChk (DAQmxCfgDigPatternStartTrig (taskHandle, "Dev1/port0:3", "11000100000000100000010000110001", DAQmx_Val_PatternMatches));
/*********************************************/
/*/ DAQmx Start Code
/*********************************************/
DAQmxErrChk (DAQmxStartTask(taskHandle));
/*********************************************/
/*/ DAQmx Read Code
/*********************************************/
DAQmxErrChk (DAQmxReadDigitalU32(taskHandle,-1,10.0,DAQmx_Val_GroupByChannel,data,arraySize,&sampsRead,NULL));
I feel like after this it should start taking data once it sees the pattern indicated above. Is there something wrong here?
Message Edited by rt_quantum on 09-20-2005 06:17 PM