I have an application where I would like to continuously obtain data from 2 or more Data Acquisition (DAQ) channels with each channel at different sampling rate. To acquire each channel at a different rate, I know I need to put each channel in a separate task. How can I switch between the tasks to gather data on each of my channels?
For example, let's say I have two tasks: Task 1 reading data during 1 second at 20 kHz and Task 2 reading data during 0.5 second at 10 kHz. How can I manage to start Task 2 when Task 1 is finished?