Streaming DataRate

Post your .Net discussions here
Post Reply
labnet
Newbie
Posts: 0
Joined: Mon Oct 21, 2019 4:00 am

Streaming DataRate

Post by labnet » Thu Oct 24, 2019 3:14 am

What happens if calls aren't made fast enough to pull data from the streaming buffer?
Does the dll drop data or buffer it?
If it drops data, what is the mechanism for letting the application know.
If it buffers data, how much does it buffer?

AndrewA
PICO STAFF
PICO STAFF
Posts: 245
Joined: Tue Oct 21, 2014 3:07 pm

Re: Streaming DataRate

Post by AndrewA » Thu Oct 24, 2019 3:57 pm

Hi,
For streaming with the SDK I would recommend at least a buffer size of 1M samples and calling psXXXXGetStreamingLatestValues function 1/3 to 1/2 of the collect time to full this buffer.
So if it takes 1 second to capture 1M samples, call psXXXXGetStreamingLatestValues every 1/3 to 1/2 of a second.
But if your sample rate very slow say 10ms for example you could reduce the size of the buffer.

If the buffer is left to full up and overflow then data will lost! The size of the buffer is up to you.
There no mechanism to indicate the buffer has overflowed. But normally you will see a the same value repeated in the data ie a straight line.
Regards Andrew
Technical Specialist

Martyn
Site Admin
Site Admin
Posts: 3709
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Streaming DataRate

Post by Martyn » Thu Oct 24, 2019 7:41 pm

If the buffer fills up then you won't lose data straight away, instead it will back up using a fifo buffer on the device. With a deep memory device this offers good protection as when you start emptying the drivers buffer again it will be able to refill it from the device using the full line rate USB speeds of 250MS/s with USB3 devices and 30MS/s for USB2. That is the reason that the fastest supported streaming rate for each device is around half the actual USB line rate.
Martyn
Technical Support Manager

Post Reply