PS4824 Streaming + Aggregation

Post your C and C++ discussions here
Post Reply
atanamir
Newbie
Posts: 0
Joined: Mon Mar 19, 2018 3:06 pm

PS4824 Streaming + Aggregation

Post by atanamir » Fri Feb 22, 2019 9:05 am

Hi,
I set up a streaming program following your code example for a 4824 and it works as expected. However, once I try to use the hardware downsampling mode, it only records 1/10th of the datarate I was expecting.

Goal
I would like to be able to take samples at 20 MS/s for all channels (or as high as it can possibly be) and perform averaging over the 40'000 samples to get an effective sampling rate of 500 S/s.

Is this possible or does the Picoscope would take too long to perform the averaging?

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

Re: PS4824 Streaming + Aggregation

Post by AndrewA » Wed Feb 27, 2019 3:26 pm

The PicoScope should be able achieve this level of down sampling.
The 4824 has maximum streaming rate of 160 MS/s total across all channels
So with all 8 channels would give sampling rate of 160 MS/s / 8 = 20MS/s = 50ns interval
If you pass in 50ns for the sampleInterval argument into the function ps4000aRunStreaming() it will return the closest sample Interval.
So to get an effective sampling rate close to 500S/s you would need to set the downSampleRatio to around 40000 (20MS/s / 500S/s).
Have you tried to do this?
We recommend calling ps4000aGetStreamingLatestValues function 1/3 to 1/2 of the collect time to full the buffer.
So if it takes 1 second to capture 500 samples, call psXXXXGetStreamingLatestValues every 1/3 to 1/2 of a second.
You could try adjusting the size of the data buffer set in ps4000aSetDataBuffer() to get the best performance.
Regards Andrew
Technical Specialist

Post Reply