I am using NI-DAQmx on an M-series device (in my case, PCI-6229, but my customers may use just about anything). I am writing in C++ using VC++.net.
I would like to be able to set up a counter to produce a one-shot pulse, and then be able to repeat that pulse under software control at any time I wish. It would be best if I could avoid setting up the task repeatedly.
Here is the sequence of calls I use (the actual code is not this neat because it is driven by a hosting application):
DAQmxCreateTask(&h)
DAQmxCreateCOPulseChanTime(h, namestr.c_str(), NULL, DAQmx_Val_Seconds, DAQmxValLow, 0, timelow, timehigh);
DAQmxStartTask(h)
It would be nice if at a later time (after the initial pulse is finished) I could call DAQmxStartTask() again to produce another pulse.
The question: is there a property or something that I could set to allow re-starting the task without the setup time required to destroy the task and re-create it?
Is there some call that will repeat the task without the setup overhead?
John Weeks
WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com