Fast acquisition and plotting of averaged data under Matlab

Post your MATLAB discussions here
Post Reply
jsaucourt
Newbie
Posts: 0
Joined: Mon Nov 16, 2020 6:35 pm

Fast acquisition and plotting of averaged data under Matlab

Post by jsaucourt »

Hello,

I have a Picoscope 5444 D MSO, and I am struggling to adapt the provided examples for my application.

I want to acquire a short transient signal (about 20 ns), located between 3 to 9 us after a pulse event. I want to use each pulse, occuring every 500 us, as a trigger signal to start the acquisition of the transient signal. I need to acquire about 60000 pulses (total experiment time = 30s). What is critical is that I cannot miss a single pulse event. I only need to measure the signal after each pulse event for 10 to 15 us.

I can do this using the block mode. However, retrieving the data from the scope is super slow, and I have no way to visually check the signal during those 30s. I would like to be able to plot a moving average of the measured signals while the scope is acquiring. Is it possible, knowing that I absolutely need to measure 15 us of data every 500 us ? If I retrieve less data in a loop, the loop takes a lot of time, about 30 ms for a single 10k points vector.

I have tried to use the streaming mode of the scope, but it seems that it completely ignores any trigger (the trigger event is the pulse every 500 ms in my case).

Is there any workaround to do that ? Basically, I would like to do a moving average of a triggered event, like any proper oscilloscope would allow me to do.

Best regards,

Jérémy

Gerry
PICO STAFF
PICO STAFF
Posts: 798
Joined: Mon Aug 11, 2014 11:14 am

Re: Fast acquisition and plotting of averaged data under Matlab

Post by Gerry »

Hi Jeremy,

Once you have run ps5000aRunBlock() to get the data, and the trigger has occurred, the hardware PicoScope will reach a point when all of the data has been captured. It is at this point that you can retrieve average values, as Downsampled data, instead of waiting for all of the data to be transferred, and checking for when that has happened, before retrieving it from the driver (this is essentially what PicoScope 6 does, when allowing you to zoom in and out while data is being transferred, once the trigger has occurred). You don't need to check, you can just run ps5000aGetValuesAsync() with the Downsample ratio that you want to use, anytime after calling ps5000aRunBlock() and you will get an indication of when the data is ready.

You can find more information for this under 'Retrieving stored data' and 'ps5000aGetValuesAsync' in the 'PicoScope 5000 Series (a API) programmers guide'.

Regards,

Gerry
Gerry
Technical Specialist

Post Reply