From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Query number of records in device buffer?

Does anyone know of a way to query the number of records left to read in a device's memory? I am using a PXI-5105 digitizer card to record somewhat random events over a 15 second interval. The task is set to trigger off of a rising edge on channel 0 and records a finite number of samples around the trigger event. Because the event is somewhat random, there will be from 900 to 1500 records created. Is there a way I could "see" how many records or trigger "events" have been recorded before I begin my asynchronous Read call? I would like to dispose of the task after I clear the buffer out and reconfigure a new task in time for the next series of events. (The next series of events require a different task configuration.) Thanks, -Prescott Glynn
0 Kudos
Message 1 of 2
(3,011 Views)

Hi Prescott,

There are two scope properties that I believe may help. The first is ‘RecordsDone()’ (found under ScopeAcquisition), which Specifies the number of records that have been completely acquired. This one should let you ‘see’ the number of records (triggers) that have happened. The second is ‘GetBacklog’ (Found under either ScopeMultipleRecordReder orScopeSingleRecordReader), which returns the number of samples that have been acquired, but not fetched. I think the ‘recordsdone’ is more applicable for your application, but wanted to mention ‘GetBacklog’ to make you aware.

David L.
Systems Engineering
National Instruments
0 Kudos
Message 2 of 2
(2,984 Views)