Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How fast a callback function can be invoked in NIDAQmx?

Hello,
 
I'm planning to use DAQmxRegisterSignalEvent ( ) to register a callback function on event DAQmx_Val_SampleClock or DAQmx_Val_CounterOutputEvent. I want to know what's the maximum rate the callback function can be reliably invoked? For example, if the CounterOutput is at 1000 HZ, can I expect the callback function will be called on time at such rate?
 
 
Thanks!
 
 
Ellen Zeng
0 Kudos
Message 1 of 2
(2,617 Views)
Unfortunately, the answer to your question is machine dependent.  In short, you don't have to worry about your events getting "lost" as they are queued up internally so each event will be serviced in order as soon as the processor can handle the event.  However, the speed at which the processor can service each event is a function of both the processor speed and whatever else is taking up processor cycles on your machine (e.g. other applications).  If you exceed what your processor can handle, you may observe what appears to be your system hanging, as it cannot respond to anything else because it is too busy servicing interrupts.  This prevents the CPU from doing anything else, including updating your front panel GUI. 
 
1000 Hz sounds like a perfectly reasonable rate at which to run your counter output task, but understand that your performance or application execution timing may change if your deployment system is not the same as your development system.
0 Kudos
Message 2 of 2
(2,612 Views)