Time base question (5444B)

Post your .Net discussions here
Post Reply
Sigge83
Newbie
Posts: 0
Joined: Tue Dec 01, 2015 9:10 am

Time base question (5444B)

Post by Sigge83 »

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

Hitesh

Re: Time base question (5444B)

Post by Hitesh »

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

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

Re: Time base question (5444B)

Post by Sigge83 »

Thank you so much Hitesh for clarifying that!

Post Reply