Sampling Specific Points during a Continuous Stream ps5000a

Post general discussions on using our drivers to write your own software here
Post Reply
solarspear
Newbie
Posts: 0
Joined: Mon Mar 22, 2021 10:55 pm

Sampling Specific Points during a Continuous Stream ps5000a

Post by solarspear »

Hello,

I'm trying to run a data collection process where I collect voltage readings starting at a specific condition in the script, stop reading after another condition, wait until the next data point is ready to start collecting again, etc. for up to 1000 data points. I've done this through two (unsuccessful) ways:

1) my first attempt is re-initializing the buffers with SetDataBuffer and RunStreaming for each >1000 points, and then using GetStreamingLatestValues to get voltage data, but this causes some sort of memory issue and forces the script to exit at random points without any errors or warnings.

2) my second attempt is initializing the buffer and streaming only once at the beginning of each data collection routine, then using GetStreamingLatestValues to collect values for each of the >1000 data points. But this is causing an issue where the data buffer is showing incorrect voltages, up to the point that even disconnecting the BNC connector doesn't do anything to the data buffer.

Would appreciate any advice into which solution to use, or what I'm doing wrong!

bennog
Advanced User
Advanced User
Posts: 80
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

Re: Sampling Specific Points during a Continuous Stream ps5000a

Post by bennog »

Can you give us some info of how fast your are streaming, number of samples / second.
and what the allowable timing tolerances are between the software event and the sample data ?

Benno

solarspear
Newbie
Posts: 0
Joined: Mon Mar 22, 2021 10:55 pm

Re: Sampling Specific Points during a Continuous Stream ps5000a

Post by solarspear »

Hi Benno,

I'm streaming at 10 MSa/s with a 100 ns sampling time. The allowable tolerances are large since the sampling event lasts 200-500 milliseconds, and I want to sample a 40-100 kHz signal so only need to capture 10-25 microseconds of data.

bennog
Advanced User
Advanced User
Posts: 80
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

Re: Sampling Specific Points during a Continuous Stream ps5000a

Post by bennog »

And the decision to save some part of the data is depending on the read values or some software trigger from a external source e.g. TCP or software event.

If it is from the sampled data can you use a advanced or normal trigger to do this in the picoscope software.

If you can use triggers the resulting software is less vulnerable to performance variations of the used pc.

Benno

solarspear
Newbie
Posts: 0
Joined: Mon Mar 22, 2021 10:55 pm

Re: Sampling Specific Points during a Continuous Stream ps5000a

Post by solarspear »

Yes the decision is based off of a software trigger event, not from the sampled data. Is there a way to use triggers for this sort of application, or a better way to go about data collection?

bennog
Advanced User
Advanced User
Posts: 80
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

Re: Sampling Specific Points during a Continuous Stream ps5000a

Post by bennog »

If the software can control a digital output signal 3.3V 5V or 24V then you can let the scope trigger to this signal and make the required number of samples before and after the digital signal.

This makes the timing far more precise then the timing is only dependent on how accurate you can set the digital output signal.

Benno

Post Reply