Lesley,
Thank you very much for your suggestion. Late last night I actually tried a to use AI start trigger instead of AO start trigger and it worked (since I tried the AI & AO to start simultaneously, it does not matter what triggers what), even in the loop. The devil is in details, as I had to carefully wire the number of data points and what to place inside/outside the loop.
The problem with shared clock is that I need to sample the AI and AO at different rates but using AO and AI clock separately did not seem to affect the performance.
I still want to try to use the AO start trigger (as you suggest) because I would like to delay the AI by a few ms from the AO. Is there a simple way to to that?
I suppose, switching from traditional DAQ to DAQmx requires your brain to be rewired - after playing with it for a couple of days and nights I developed a "feeling" for it. One of the differences was that, in order to use this example in the loop, one has to use 'stop task' inside and 'clear task' outside the loop.
Thanks again!
Radek Uberna