Hello,
There are a couple of solutions to this problem. The first it to use DAQ occurences (which are supported under RT), but there are even easier solutions. The first is to use AI Single Scan to time your loops. When used in continuous non-buffered mode, AI Single Scan provides a sleeping pathway to your loop. That means that when your loop reaches AI Single Scan, if it is waiting for a clock edge it will put the entire thread to sleep. This will allow for your other tasks to execute.
If you are using buffered acquisitions, you can use an alternative timing mechanism which uses the "wait" op code on the STC counter.
Both of these methods are explained in greater detail in the following
documentAlso, here is a link to a hardware timed
example.
The main assumption I have made is that you can divide your application into two separate VIs - one containing your Data Acquisition, and another containing your other tasks (like communication to the host.) The Data Acquisition can be set to time crtical priority. Whenever it sleeps (as defined by AI Single Scan or the counter wait), the other (comm) loo can excute. This architecture is defined in this
artice.
Regards,
Dafna Livni
National Instruments