Hi Andrei,
Yes, he is talking about combining the two examples into one program. Then you can add in an analog input task that doesn't read anything, but instead use the sample clock from that analog input task for the sample clock for the digital input and output tasks. You will want to make sure that you start the digital in and digital out tasks before starting the analog input task so that both the digital in and digital out will start at the same time that the analog input starts.
This works because the sample clock for the analog input does not start until you start the analog input task. You can start the digital input and output tasks, but nothing will happen since there is no sample clock. Once the clock signal starts, then the digital input and output tasks will start and since they are using the same clock channel, they will start at the same time.
Thank You,
Nick F.
Applications Engineer