Unexpected Behavior of DAQmxCreateCOPulseChanTicks initialDelay Parameter In NI-DAQmx C API

Updated Apr 8, 2024

Reported In

Driver

  • NI-DAQmx

Programming Language

  • C

Issue Details

I want to delay the pulse generation for N amount of master clock pulses, the "DAQmxCreateCOPulseChanTicks" seems to have that exact parameter. When experimenting with various values, the delay is always the same, it always waits 4 ticks after generating the first pulse. What is the reason for this behavior?

Solution

The reason for such behavior is that TIO (Time-Interval Output) only applies the initial delay on the very first trigger of a retriggerable task. As a result, if the delay is not being changed on the retriggers that is expected, however if you cannot see the trigger on the first trigger event, then that is unexpected, and you should contact NI Support

Additional Information

In the X series devices, a new attribute "CO.EnableInitalDelayOnRetrigger" has been added, that will apply the initial delay to all retrigger events.