Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -200992: events are generated too quickly

Rod,

After much experimentation, I've found that my DAQmx performance problem occurs only briefly during the initialization of an unrelated process that is part of the large system I'm working within.  For about two seconds that process does some very CPU-intensive work, and it is during that time that my analog input task can't keep up.  I've devised a satisfactory way to restart the task when this happens, and after this initial hiccup the analog input task is fast and reliable.

I've had to wrap up my work on the 6255 for now, although I'll be returning to it in several weeks.  I won't be able to work with the hardware-timed-single-point option until then.  However, I would like to know how your example will need to be changed to handle two AI channels in the task.  Does the callback function retrieve two values each time it is called, or is the callback function called twice for each sample, or is this not possible at all?

Thank you for all of your attention.

John Gourlay
0 Kudos
Message 11 of 12
(808 Views)

Hi John,

No problem, that’s what I’m here for.  To answer your question, it is definitely possible to acquire from two channels.

DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0:1","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));

As you can see, it is as simple as adding a colon followed by the next channel.  So, the callback function retrieves two values each time it’s called.  Make sure to change the Array Size in Samples parameter (in DAQmxReadAnalogF64) to 2 for 2 channels.

Rod T.
0 Kudos
Message 12 of 12
(788 Views)