LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can DAQ Occurrences be used on a Real-Time controller?

Need to run a time critical loop at 300 Hz (26 channels, 7 points per channel), but need plenty of processor available to do other things (like stream the acquisition to a remote PC over Datasocket) while the DAQ loop is waiting. I have a method that "works" right now with a software wait, but would really prefer to use the DAQ Occurrence feature.

Hardware:
PXI-8175 contoller, PXI-6031E DAQ

Software:
LabVIEW 6.1 Real-Time
0 Kudos
Message 1 of 2
(2,910 Views)
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 document

Also, 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
0 Kudos
Message 2 of 2
(2,910 Views)