Test and Measurement Forum

Time base question (5444B)

Post your .Net discussions here

Time base question (5444B)

Postby Sigge83 » Thu Dec 03, 2015 6:16 pm

Hello,
I,m having a hard time figuring out how the GetTimebase() works. I have a Picoscope 5444B set to 12 bit resolution and only one channel active. If I choose a timeBase of 500 ns and wan't to capture 2500 samples I would think that it would work and that I would get a sample interval of 2 ns. The code looks like this:

Code: Select all
uint blockSamples = 2500;
uint blockTimeBase = 500;
int timeInterval;
int maxSamples;
while(Imports.GetTimebase(handle, blockTimeBase, (int)blockSamples, out timeInterval, out maxSamples, 0) != 0)
{
                blockTimeBase++;
}
Console.WriteLine("timeInterval:" + timeInterval + " maxSamples" + maxSamples + " blockTimeBase:" + blockTimeBase);


But instead I'm getting a output that looks like this:
Code: Select all
timeInterval:7952 maxSamples67108800 blockTimeBase:500


What am I missing? Would someone please explain this to me.

Best regards
S
Sigge83
Newbie
 
Posts: 0
Joined: Tue Dec 01, 2015 9:10 am

Re: Time base question (5444B)

Postby Hitesh » Fri Dec 04, 2015 9:44 am

Hi S,

Referring to section 8 (Timebases) of the PicoScope 5000 Series (A API) Programmer's Guide the timebase index corresponds to a sampling interval governed by a formula which depends on the resolution selected.

The ps5000aGetTimebase function is used to verify that the timebase index corresponding to the desired sampling interval is valid depending on the number of channels that are enabled and also to determine the number of samples available per channel for the segment selected.

Please note that the timebase parameter passed to the function is not the total collection time, so if you require a sampling interval of 2 nanoseconds, you will need to choose a timebase of 1 based on the Sample interval examples column in the table for 12-bit resolution.

This sampling interval will only be available with 1 channel enabled in 12-bit mode.

Hope this helps,
Last edited by Hitesh on Tue Dec 08, 2015 9:25 am, edited 1 time in total.
Reason: Edited to indicate that sampling intervals available depend on number of channels enabled
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2009
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Time base question (5444B)

Postby Sigge83 » Tue Dec 08, 2015 7:42 am

Thank you so much Hitesh for clarifying that!
Sigge83
Newbie
 
Posts: 0
Joined: Tue Dec 01, 2015 9:10 am


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

Who is online

Users browsing this forum: No registered users and 0 guests