We are doing something similar where we send the output of the analog
trigger to the gate of the counter. It seems to work, although we have used
it much yet. Here are some relevant code snippets:
//send signal from start trigger to gate of counter
iStatus = GPCTR_Change_Parameter (iDevice, ND_COUNTER_0, ND_GATE,
ND_PFI_0);
//Tell MIO to use the analog triggering
iStatus = Configure_HW_Analog_Trigger (iDevice, ND_ON, lLowValue,
lHighValue, ND_HIGH_HYSTERESIS,
ND_THE_AI_CHANNEL);
/* Setup for external start trigger into PFI0. */
iStatus = Select_Signal(iDevice, ND_IN_START_TRIGGER, ND_PFI_0,
ND_LOW_TO_HIGH);
We also had to perform a dummy acquisition to get the MIO to set up all the
connections.