Test and Measurement Forum

GetTimebase sets wrong timeInterval

Post your .Net discussions here

GetTimebase sets wrong timeInterval

Postby AlXCo » Tue Mar 29, 2011 12:37 pm

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?
AlXCo
 

Re: GetTimebase sets wrong timeInterval

Postby Chris » Thu Mar 31, 2011 3:15 pm

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

Why do you think a 0ns sampling interval has been set?
Chris
Site Admin
Site Admin
 
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Re: GetTimebase sets wrong timeInterval

Postby AlXCo » Mon Apr 04, 2011 12:54 pm

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.
AlXCo
 

Re: GetTimebase sets wrong timeInterval

Postby Chris » Mon Apr 04, 2011 3:18 pm

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).
Chris
Site Admin
Site Admin
 
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots


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

Who is online

Users browsing this forum: No registered users and 0 guests