Time/Div conversion

Post your LabVIEW discussions here
Post Reply
Miakatt
Newbie
Posts: 0
Joined: Wed Feb 04, 2015 9:02 am

Time/Div conversion

Post by Miakatt »

Hi all,
I have a Picoscope 5444B which I am almost done writing a LabView program for. I have a serious time constraint so I am asking here for help to sort out my last issue.
I need to get the timebase set up correctly so that I can display the time/div just like a conventional scope.
I'm having trouble getting my head around the documentation for the gettimebase function.
Does anyone have a LabView vi example that I could plagiarise? (with credit!)

I am using the scope in 4 channel, 14 bit mode. I'd like to be able to chose the number of post/pre samples in order to zoom in to the desired part of the trace.

I really appreciate any help you guys (or girls!) can offer.

Thanks,
Alan.

Karunen
Advanced User
Advanced User
Posts: 194
Joined: Thu Nov 21, 2013 9:22 am

Re: Time/Div conversion

Post by Karunen »

Hi Alan,

Unfortunately Pico Technology does not have this VI.

But what you could do is create a while loop that passes a timebase into gettimebase function and use the sample interval that is return from the function as a pointer.

Please note the timebase you can choose will depend on the number of enabled channel and the resolution you are using.

Kind Regards,
Karunen

Technical Specialist
Pico Technology

Miakatt
Newbie
Posts: 0
Joined: Wed Feb 04, 2015 9:02 am

Re: Time/Div conversion

Post by Miakatt »

Hello Karunen.
Thanks for the reply. Can you please clarify the steps?
I always use the scope in 4 channel, 14-bit mode. Therefore, the ns/S equation is:
ns/S = (T-2)/125,000,000.

What exactly does my while loop converge upon? I've been reading the paragraph in the manual over and over on this topic and I obviously have misunderstood something! :?

Thanks.
Alan.

Hitesh

Re: Time/Div conversion

Post by Hitesh »

Hi Alan,

The ps5000aGetTimebase function can be used to validate the timebase index selected and confirm the sampling interval in nanoseconds.

There are a few conditions under which the first few timebase indices would not be valid (e.g. you cannot use timebase 0 if the resolution is set to 16-bit) so this is where the iteration would come in or you might iterate to find the timebase index that corresponds to the desired sampling interval.

Below is the process that you would use to iterate:
  • Initialise a timebase variable
  • Loop
  • Call ps5000aGetTimebase
  • Check that the status is 0 (and if the sampling interval is correct)
  • If the status is not 0, increment the timebase variable by 1
  • Repeat loop if the desired sampling interval has not been found
Are you looking to zoom in and out on a view once the data collection has stopped?

I hope this helps.

Post Reply