Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I read a counter buffer that collected fewer than the requested

I am trying to read 9 encoders using buffered encoder measurements on 3 PXI-6608 cards (three DMA channels per card). I can barely get a 1 kHz sample rate using a bare-bones VI.

I am wondering if there is a way to read however many samples were written to the buffer? When I call CounterReadBuffer.vi I either get all of the data or none of it along with an error message.

Thanks,

RGA
0 Kudos
Message 1 of 2
(3,122 Views)
If you're calling "Counter Read Buffer.vi", you must be using traditional NI-DAQ. Simply call "Counter Get Attribute.vi", selecting 'available points' as the input parameter. The 'value' output tells how many points are buffered and available. You can feed it to "Counter Read Buffer.vi" to retrieve them instantly, without waiting for the buffer to fill.

Depending on whether all 9 encoders share the same trigger and/or gating signals, you may want to query once then pass the same value to *all* the calls to "Counter Read Buffer.vi" in order to keep your data in sync.

-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 2
(3,122 Views)