Discussion:
interrupts and the pci-6601
(too old to reply)
jjwilliam
2006-10-25 18:40:13 UTC
Permalink
Hello Neil,
We are using Visual Studio. The application is written in MFC/c++.
Thank you,
Jack.
Neil S.
2006-10-26 21:10:10 UTC
Permalink
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
Continue reading on narkive:
Loading...