I am posting this to see if anyone can shed any light on various DAQmx operations with counters. I appear to have found a solution for the project but various counter operations are certainly not well documented and the notes I am posting may help anyone trying to do something similar.
The project is to monitor an analog input channel and when a certain criterion is met generate a pulse with a specified width at a specified delay from the event. It is being done in a LV Real Time system. Initially I tried to start a counter task within a loop, wait until done and stop the task. What I have found is that it takes a long time (of the order of 10-100's of ms) for the start task to return and the wait until done doesn't reliably return at the time the counter pulse is finished being generated. Other people seem to have found the same problem. This is described in the part 1 attachment and the attached vi.
The other way to do it is with a retriggerable counter task and using a digital line on the same card to trigger the counter. Then the way the counter works if there is a single pulse or multiple pulses is different. The way low time and high time are interpreted is odd. This is described in the part 2 attachment with screenshots from Scope captures. I have a proposed solution but I'm not sure if it is the best way to do it.
Any suggestions appreciated.