Jack, In MFC/C++ you could employ the method that I mentioned above. You would make calls in this order:
int32 DAQmxCreateCICountEdgesChan (TaskHandle taskHandle, const
char counter[], const char nameToAssignToChannel[], int32 edge, uInt32
initialCount, int32 countDirection);
int32 __CFUNC DAQmxSetCICountEdgesTerm(TaskHandle taskHandle,
const char channel[], const char *data); // set the source for the pulses
int32 __CFUNC DAQmxSetCIDupCountPrevent(TaskHandle taskHandle,
const char channel[], bool32 data);
int32 DAQmxCfgSampClkTiming (TaskHandle taskHandle, const char
source[], float64 rate, int32 activeEdge, int32 sampleMode, uInt64
sampsPerChanToAcquire); // set the clock source to the same PFI line as used for source of pulses
int32 DAQmxRegisterEveryNSamplesEvent (TaskHandle taskHandle,
int32 everyNsamplesEventType, uInt32 nSamples, uInt32 options,
DAQmxEveryNSamplesEventCallbackPtr callbackFunction, void *callbackData); // set nSamples to 1 select a function that you want to run with each pulse.
int32 DAQmxStartTask (TaskHandle taskHandle); Now each time a pulse arrives the program should call the callbackFunction. This allows the program to be alerted when a pulse arrives. Let me know if you have any questions about this approach.Regards,Neil S.Applications EngineerNational Instruments