Hi Suri,
There are several examples to synchronize different tasks (AI, AO, DIO). Synchronization of the Digital lines in the following method requires that you have correlated (hardware-timed) digital IO. Synchronization can be achieved either by triggering or sharing a sample clock. The following steps are generally followed:
1) One task is selected to trigger the other tasks (i.e the analog input sample clock can be used to clock or trigger the other tasks (AO, DIO)).
2)This task is configured first and the sample clock is provided to the other tasks.
3)A DAQmx Start Task is called for the other tasks before calling the DAQmx Start Task for the selected triggering task.
If you are working with LabVIEW, search the Example Finder (Help>>Find Examples) for "Function Synchronization" to bring up the DAQmx synchronization examples. The examples generally synchronize 2 tasks, however the theory could be expanded to 3.
Regards,
Jennifer O.
Applications Engineer
National Instruments