Solution
The reason for "DAQmx Is Task Done.vi" and "DAQmx Wait Until Done.vi" apparently not working is that a retriggerable task is never considered done. However there are other solutions for getting a notification every time the task was triggered or to gracefully stop the task.
Getting a notification every time the task was triggered
There are three different possible solutions in case you need a notification every time the task was executed:
- When you are using a Counter Output Channel to generate the Train of Pulses, you can query the CO.PulseDone property from the DAQmx Channel Property Node (Counter Output:General Properties:More:Pulse Done) to determine if the previous generation has finished.
- A retriggerable finite output task that does not use a counter channel is different: This recurring task is fully handled within the DAQ device's hardware, so the host PC simply does not see anything of it. A simple solution here is to hard-wire the trigger to another input line of the DAQ device and read it separately from there. Your program can then react on that trigger.
- In case you are doing a triggered finite acquisition, you can register an Event that happens after every Nth sample has been transferred from the DAQ device to the PC's buffer. Use DAQmx Create Event.vi to do so.
Stopping the task after it has finished handling a trigger
If you want to gracefully stop a general output channel's task, you can set the DAQmx Trigger property Start.Retriggerable (Start:More:Retriggerable) to FALSE first and then use "DAQmx Is Task Done.vi" and/or "DAQmx Wait Until Done.vi" to determine the status of the now-finite task.