GetTimebase sets wrong timeInterval

Post your .Net discussions here
Post Reply
AlXCo

GetTimebase sets wrong timeInterval

Post by AlXCo »

I am using the ps4000GetTimebase(...) function at a ps4227 in C# and I have a problem with setting the timebase to 4ns here. The programmer's guide explicitly says that 4ns is only available at ps4227, but I can not set the timbase to this value.

I do the following :
ps4000GetTimebase( handle=1, timebase=0, noSamples=1024, out timeInterval, oversample=1, out maxSamples, 0);

After calling the function with timebase=0; timeInterval should be set to 4(ns).
But that's no the case. :? It is 0(ns) instead.

When I use timebase=1, timeInterval is set to 8(ns), which is what I expected and what's said in the documentation.

Does anybody see what's wrong here?

Chris
Site Admin
Site Admin
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Re: GetTimebase sets wrong timeInterval

Post by Chris »

But that's no the case. :? It is 0(ns) instead.

Why do you think a 0ns sampling interval has been set?

AlXCo

Re: GetTimebase sets wrong timeInterval

Post by AlXCo »

I called 'ps4000GetTimebase(..., timebase, ... , out timeInterval, ...)' with the parameter timebase=1. After calling teh function the varibale 'timeInterval' is set to 8, which stands for 8ns.
I tryed the same with timebase=0 after that, but 'timbase' is now set to 0 the instead of 4. So I believe setting the timebase to 4ns isn't possible here.

Chris
Site Admin
Site Admin
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Re: GetTimebase sets wrong timeInterval

Post by Chris »

I tryed the same with timebase=0 after that, but 'timbase' is now set to 0 the instead of 4

The timebase value is 0 because that is what you set it to. Check the timeInterval value. It will be set to 4.

Note: You can only set timebase 0 if you disable one of the 2 channels. Both channels are enabled by default. You will need to call ps4000SetChannel with enable set to 0 for one of the 2 channels in order to set a timebase value of 0 for the other channel.

With both channels enabled the fastest timebase you can set is 1 (8nS sample interval).

Post Reply