Test and Measurement Forum

RunStreaming function

Post your LabVIEW discussions here

RunStreaming function

Postby MikeNuke » Thu Jan 29, 2015 9:54 am

Hi!
I am testing my streaming software and I am having doubts about the RunStreaming function (I am using ps4000, ps4000a, ps5000 and ps5000a).

Two of the inputs are maxPreTriggerSamples and maxPostTriggerSamples, and the manuals report that the sum of this values is "the maximum number of samples to be stored".

Another input is overviewBufferSize, "the size of the overview buffers. These are temporary buffers used for storing the data before returning it to the application".

What is the difference between this numbers (the sum and the buffer size)?
Must they be the same or be treated in particular way?

Thank you all!
Mike
MikeNuke
Politecnico di Milano
Department of Energy, Nuclear Engineering Division
MikeNuke
Newbie
 
Posts: 0
Joined: Thu Oct 31, 2013 1:49 pm

Re: RunStreaming function

Postby Karunen » Fri Jan 30, 2015 3:26 pm

Hi Mike,

maxPreTriggerSamples & maxPostTriggerSamples are the "the total number of samples stored in the driver".

The overview buffer is where the driver puts the data when you call GetStreamingLatestValues.
This allows you to copy data into your application.

The larger the overview buffer the more data it can copy across in one go. Large overview buffers helps reduce the likelihood that data corruption will occur.

After streaming mode is complete (after to call Stop or 'auto stop' occurs) you can call GetValuesAsync which will return the values stored in the driver. The number of samples will depend on how many samples have been collected and if the trigger event occurred. But at the most you will only get maxPreTriggerSamples + maxPostTriggerSamples.

Since the examples we provide in the SDK use GetStreamingLatestValues we do not use GetValuesAsync.

This is not like block mode where you only get maxPreTriggerSamples + maxPostTriggerSamples

Kind Regards,
Karunen

Technical Specialist
Pico Technology
Karunen
Zen Master
Zen Master
 
Posts: 194
Joined: Thu Nov 21, 2013 9:22 am

Re: RunStreaming function

Postby MikeNuke » Wed Feb 04, 2015 8:34 am

Thank you for the answer.

So, in principle the overview buffer should be at least as large as the total number of samples stored in the driver?
Is it useful to have an overview buffer larger than the total number of samples stored in the driver?

Thanks again
Mike
MikeNuke
Politecnico di Milano
Department of Energy, Nuclear Engineering Division
MikeNuke
Newbie
 
Posts: 0
Joined: Thu Oct 31, 2013 1:49 pm

Re: RunStreaming function

Postby Karunen » Fri Feb 06, 2015 8:39 am

Hi Mike,

In principle it does make sense to have a overview at least as large as the total number of samples stored in the driver.

But it is far more useful to have the overview larger than the total number of samples stored in the driver.

Kind Regards,
Karunen

Technical Specialist
Pico Technology
Karunen
Zen Master
Zen Master
 
Posts: 194
Joined: Thu Nov 21, 2013 9:22 am


Return to LabVIEW

Who is online

Users browsing this forum: No registered users and 0 guests