Pico Scope 6824E C# RunBlock method max nº of samples

Post your .Net discussions here
Post Reply
diogoalves92
Newbie
Posts: 0
Joined: Mon Sep 21, 2020 9:28 am

Pico Scope 6824E C# RunBlock method max nº of samples

Post by diogoalves92 »

Greetings,

I am implementing the 6824E on a C# application in which I need to read and store values from 7 channels taken during a 28 second time interval.

I've been looking at the ps6000aExamples, more specifically, the BlockModeExampleCallback that (if I understood correctly) signals the picoscope to collect numSamples amount of samples with idealTimeinterval time interval between each, waits the data to be captured by the picoscope and then reads that data from the picoscope to the pc and saves it on a .csv file. Now, my questions are;

-What is the sample limit for this blockmode capturing? I mean, if the picoscope is storing the values it captures before "releasing" them or sending them to the pc after the block capture is complete, there should be a maximum number of values/samples it can hold.
-Is this maximum number of samples individual for each channel or altogether?

Thanks in advance.

Siebje
Newbie
Posts: 0
Joined: Tue Mar 13, 2012 1:33 pm

Re: Pico Scope 6824E C# RunBlock method max nº of samples

Post by Siebje »

Limits are covered in the datasheet https://www.picotech.com/download/manua ... -sheet.pdf
6*24E: 4GS (2 GS at 10/12-bit)
6*04E: 2GS
6203E: 1GS

And yes, the memory is shared between active channels.

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

Re: Pico Scope 6824E C# RunBlock method max nº of samples

Post by bennog »

If you are taking in samples for 28 seconds I will suggest using streaming mode.
For this period the number of samples per second you can capture is higher than using the scope memory.

Benno

diogoalves92
Newbie
Posts: 0
Joined: Mon Sep 21, 2020 9:28 am

Re: Pico Scope 6824E C# RunBlock method max nº of samples

Post by diogoalves92 »

Thank you for the responses. Data streaming seems to be the logical move but i am basing myself on the c# examples at github and it doesn't contemplate data streaming, and there isn't programmer's guide for 6000E series so i am going to try to do it with blocks. The issue will be the fact that i won't even able to capture all the data due to likely overhead between capturing blocks.

I tried to capture 4GS using 8 bit resolution on the 6824E but since the maximum size of an array would be 2GB in C# i set gcAllowVeryLargeObjects to true to enable a larger array that could store all the data. PS6000a.SetDataBuffers returned 516 error status, does anyone know why?

Thanks.

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

Re: Pico Scope 6824E C# RunBlock method max nº of samples

Post by bennog »

Streaming mode will not get you beyond 40MS/sec or somethin like that.

if you are sampling 28 sec at 4G/sec that means you need about 128 GB of ram in the scope.

What are you measuring ?

Benno

diogoalves92
Newbie
Posts: 0
Joined: Mon Sep 21, 2020 9:28 am

Re: Pico Scope 6824E C# RunBlock method max nº of samples

Post by diogoalves92 »

It is a 28 second long test procedure to validate a PCB that was implemented few months ago, but due to high rejection rate on it, the client is trying to look for possible causes and they want to monitorize high frequency transitions at power MOSFETs during the entire test. Their desired sampling rate would be 100 million samples per second on each channel for 6 channels which would be a total of 600 million samples per second for 28 seconds to a whooping total of 16.8*10^9 samples which easily exceeds the 4GS (for 8 bit samples) memory on the scope. Going for data streaming is an idea even though the rates would be lower, i am currently waiting for response on an email i sent about that. Meanwhile i also thought about collecting various blocks but i think there would be too much overhead between capturing a block, retrieving a block and being able to capture a new one, loosing a lot of data in between. Lastly, i thought about capturing 4GS during the 28 second (not 4GS/s as i think you misunderstood, i mean 4GS/28s ~ 143MS/s) on a lower rate than desired, that would be ~23.8 mega samples per channel (considering 8 bit samples), however i would also need an array with 4*10^9 entries which exceeds the maximum allowed, so as i said in last post i set gcAllowVeryLargeObjects to true in the c# project config file, but doing so returns me a 516 error status message on PS6000a.SetDataBuffers which i cannot trace the cause since there is no documentation about this yet.


Diogo

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

Re: Pico Scope 6824E C# RunBlock method max nº of samples

Post by Martyn »

If you have installed the SDK you will have the PicoStatus.h file in C:\Program Files\Pico Technology\SDK\inc which lists the error codes

// The buffer length in bytes is greater than a 4-byte word.
#define PICO_BUFFER_LENGTH_GREATER_THAN_INT32_T 0x00000204UL

you will also find ps6000aApi.h which includes all the functions, and other useful header files.
Martyn
Technical Support Manager

Post Reply