Test and Measurement Forum

Average Function

Post your .Net discussions here

Re: Average Function

Postby Stone_Mei » Sun Apr 08, 2018 4:05 am

Hi Martyn!

I will try.

Do you also have met the same question as I described?
Stone_Mei
Newbie
 
Posts: 0
Joined: Fri Dec 22, 2017 6:28 am

Re: Average Function

Postby Stone_Mei » Sun Apr 08, 2018 5:53 am

Hi Martyn!

I have tried,there is the same error.

Are you sure that Pico4824 support Downsampling Function?

I change the code based Demo in SDK,except for None,Average and Decimate and Aggregate all will indicate the same error.

If Pico4824 don‘t support Downsampling Function,please tell me,I will change my solution to avoid delay.
Stone_Mei
Newbie
 
Posts: 0
Joined: Fri Dec 22, 2017 6:28 am

Re: Average Function

Postby Martyn » Mon Apr 09, 2018 8:13 am

Using the ps4000a C# PS4000ABlockExample example from GitHub and just changing line 298
Code: Select all
                status = Imports.SetDataBuffers(handle, (Imports.Channel)i, maxBuffers, minBuffers, (int)sampleCount, 0, Imports.DownSamplingMode.None);
to
                status = Imports.SetDataBuffers(handle, (Imports.Channel)i, maxBuffers, minBuffers, (int)sampleCount, 0, Imports.DownSamplingMode.Average);// None);

and line 325
Code: Select all
                Imports.GetValues(handle, 0, ref sampleCount, 1, Imports.DownSamplingMode.None, 0, out overflow);
to
                Imports.GetValues(handle, 0, ref sampleCount, 100, Imports.DownSamplingMode.Average, 0, out overflow);

and the code runs without error for me.
Martyn
Technical Support Manager
Martyn
Site Admin
Site Admin
 
Posts: 3041
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Previous

Return to .Net Languages (C#, VB.Net, .)

Who is online

Users browsing this forum: No registered users and 1 guest