Thanks for the continued help - I still haven't solved this, but it's not worth losing sleep over, either:
I actually have to stop exporting the signal to get the trigger to work. To create and export, I do this:
DAQmxCfgAnlgEdgeStartTrig(dummyAiTask, "Dev1/ai0", DAQmx_Val_RisingSlope, val);
DAQmxSetAnlgEdgeStartTrigHyst(dummyAiTask, 0.1);
DAQmxCfgSampClkTiming(dummyAiTask,"",1000.0,DAQmx_Val_Falling,DAQmx_Val_HWTimedSinglePoint ,1);
DAQmxExportSignal( dummyAiTask, DAQmx_Val_StartTrigger, "PFI8");
But if I try my trigger code:
(initially)
DAQmxCreateCOPulseChanTime( counterTaskHandle,"Dev1/ctr0","",DAQmx_Val_Seconds ,DAQmx_Val_Low,_delay,0.001,0.001);
DAQmxCfgDigEdgeStartTrig( counterTaskHandle, "AnalogComparisonEvent", DAQmx_Val_Rising );
(every pulse)
DAQmxStartTask( counterTaskHandle );
I get:
Specified route cannot be satisfied, because it requires resources that are currently in use by another route.
Property: DAQmx_CO_CtrTimebaseSrc
Property: DAQmx_CO_CtrTimebaseActiveEdge
Source Device: Dev1
Source Terminal: MasterTimebase
Required Resources in Use by
Task Name: DummyAITriggerTask
Source Device: Dev1
Source Terminal: ai/StartTrigger
Destination Device: Dev1
Destination Terminal: PFI8
Task Name: CT
Status Code: -89137
So I have to insert this before generating my pulse:
DAQmxExportSignal( dummyAiTask, DAQmx_Val_StartTrigger, "");
And then everything works great. It sounds like there is something about the internal routing that's preventing this, and again, it's not a high priority because the above line executes really fast. But if it's an easy fix that would be great too.
Thanks again,
Micah