2406B Block Mode

Post general discussions on using our drivers to write your own software here
Post Reply
lamah
Newbie
Posts: 0
Joined: Tue Feb 23, 2021 1:47 pm

2406B Block Mode

Post by lamah »

Hello,

currently i am working on a prooject with a Picoscope 2406B. I am writing my own software and i planed to use block mode because the sampling rate with stream mode is too low. I have to use all four channels of the picoscope and the signals take about 8 seconds.

My goal is to store one big block of data on the picoscope and transfer it after the signal has stopped. For my understandig the 2406B has an internal memory of 32 MS which reuslts in 8 MS per channel. This should be more than enough.

Is it even possible what i am trying to implement?

Thanks in advance and sorry for my very basic english.

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

Re: 2406B Block Mode

Post by Gerry »

Hi lamah,

Yes, it is possible and already done (for a much smaller block) in one of the Programming Languages/Environments that we support. You can find an example of this on our Github page here: https://github.com/picotech, which you can then download.

Regards,

Gerry
Gerry
Technical Specialist

lamah
Newbie
Posts: 0
Joined: Tue Feb 23, 2021 1:47 pm

Re: 2406B Block Mode

Post by lamah »

Hello,

thank you for your fast reply.

Ok so blockmode is the way to go.

As i am already doing some tests with it, i figured out some problems. I want to enhance the resolution of each chanel by averaging with the highest factor possible. For my understanding this leads to a lower sampling rate which is totaly fine for my application. I am developing the application in C#.

First i have to set up the DataBuffer via the SetDataBuffer-Method with the following parameters:

status = Imports.SetDataBuffer(_handle, (Imports.Channel)i, pinnedBuffers, (int)sampleCount, 0, Imports.RatioMode.Average);

After that i have to run the block and wait for the driver callback. When it occurs i can read the values with this code:

status = Imports.GetValues(_handle, 0, ref sampleCount, 0, Imports.DownSamplingMode.None, 0, out overflow);

For DownSamplingMode i can only choose between None or Aggregate. The Problem here is, that in the Programmers Guide for the 2000 series (A API) the GetValues-Function asks for a Imports.Ratiomode-Parameter instead of Imports.DownSamplingMode.

Just for clarification, i just copied everthing from the given Console-Example which is installed with the SDK.

Am i doing something wrong or is there a general problem?

Regards,
lamah

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

Re: 2406B Block Mode

Post by Gerry »

Hi lanah,

I do apologise for the delay in responding.

I have made corrections to this post. I'll have look at the example code.

Regards,

Gerry
Gerry
Technical Specialist

Post Reply