Hello,
The most straightforward way to decrease your task setup time would be to use the
DAQmx_Val_Task_Commit command for your task. You can find examples of how to call this command in the DAQmx C Reference help. This places the task in a commited state, which keeps the hardware programmed as much as possible to execute that single task. The other option we can look at is using a trigger as your sample clock, then we can use a retriggerable trigger for you counter and you would get a hardware timed retriggerable effect. There is a C++ example of this application in the developer zone at ni.com. If the commit command task is not giving you the necessary performance or you are having difficulty please consider this option.
http://zone.ni.com/devzone/cda/tut/p/id/5382
Please let me know if you need further help with this issue,
Michael D
Applications Engineering
National Instruments