There's 2 things that come to mind right away:
1. Have you used MAX (Measurement and Automation Explorer) to "create" a RTSI connection between the boards? You need to do this so that DAQmx can handle the flexible signal routing for you.
2. Have you defined the 2nd board's AO task to use the 1st board's AO update clock as its own? One of the inputs to the DAQmx Timing vi is for the sample clock source. When you configure AO on dev2, you should tell it to use dev1/aoupdateclock for sample timing. (I'm not 100% sure of the name and am not near my DAQ pc. It might be named dev1/aosampleclock or something similar).
-Kevin P.
ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.