LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I set up a 6534 buffer read to just return if the buffer is not full yet?

I would like my 6534 buffer read and data analysis to run asynchronosly with other data acquisition tasks. The problem is that it waits until the buffer is done before returning and everything else is stopped. I have tried several techniques to program a continuous buffer read and monitor the state of the buffer immediately so I can skip my data analysis unless the buffer is full but nothing works.
I have tried:
Setting number of scans to acquire to zero and monitoring the scan backlog.
Setting number of scans to acquire to zero and monitoring the acquisition state in mark locations.
Setting number of scans to acquire to the previous scan backlog. This method requires a second circula
r buffer that I must manage.
Of course, with all of these attempts, the DIO start was set to 0 number of scans to acquire to make it continuous.
Is there an example of this?
0 Kudos
Message 1 of 2
(2,430 Views)
Although I haven't tried this for buffered digital channels, it works for analog input channels, so give it a shot.

When using analog channels, before you call the AI Start VI, you can wire a vi located in Data Acquisition -> Calibration & Configuration called DAQ Occurrence Config vi. This VI will set an occurrence (like an interrupt) when the buffer reaches a certain size, and then you can perform your read of the buffer accordingly.

The best way to see an example of this VI is to go to LabVIEW/examples/DAQ/anlogin/anlogin.llb/Cont Acq&Chart (Asynch Occurrence). The occurrence will allow the data acquisition thread to still be open, and allow the CPU to perform other tasks while waiting for the occurrence to be set. This sounds exactly like what
you want.

I just checked the examples/DAQ/digital directory, and there is an example with continuous digital input which uses the DAQ occurrence VI as well, so this should work for you.

Mark
0 Kudos
Message 2 of 2
(2,430 Views)