Traditional time/div conversion to samples

Post your LabVIEW discussions here
Post Reply
Attila
Newbie
Posts: 0
Joined: Thu Sep 27, 2012 3:33 pm

Traditional time/div conversion to samples

Post by Attila »

Hi,

We have a traditional oscilloscope which we want to replace with a PicoScope 3204A.
We take a measurament at 40usec and 450usec on the traditional scope using 50usec/div and 200usec/div settings.

We want to automate the process using LabVIEW, so I downloaded the latest LabVIEW examples but there is no such a setting as time/div. I see preTriggerSamples, postTriggerSamples, timebase, oversample.

Can anyone enlighten me please?

Cheers

Hitesh

Re: Traditional time/div conversion to samples

Post by Hitesh »

Hi Attila,

The display in the LabVIEW example is defined in terms of the number of samples requested on each call to capture data (preTriggerSamples + postTriggerSamples).

Referring to the Programmer's Guide, when capturing data in block mode, the timebase value is an index to selecting the desired sampling interval. You could then try to use this information to modify the display to show time instead.

With the streaming mode capture example, with the default settings, there is a rolling window of 10000 samples. Again you could look to see if you can use the sampling interval defined to adjust the scale to time.

The PicoScope 6 software has it's own implementation for adjusting the display once a timebase/div has been selected but it does access the API functions in the dll.

I hope this helps.

Regards,

Attila
Newbie
Posts: 0
Joined: Thu Sep 27, 2012 3:33 pm

Re: Traditional time/div conversion to samples

Post by Attila »

Hi Hitesh,

Thanks for your quick reply. According to this post: http://www.picotech.com/support/post22095.html
my device can sample at up to 20MS/s with timebase set to 0. If I set the timebase to 2, that means 5 samples/usec, across a 500usec window that's 2500 samples, right? So I set the preTriggerSamples control to 1250, postTriggerSamples to 1250, timebase to 2 and leave the oversample on 1. But I'm not getting the same graph as it it on the PicoScope 6 software using 50usec/div setting...

What am I doing wrong?

By the way I use the PicoScope3000aExampleBlock.vi

Cheers
Last edited by Attila on Mon Oct 01, 2012 10:25 am, edited 1 time in total.

Hitesh

Re: Traditional time/div conversion to samples

Post by Hitesh »

Hi Attila,

Are you using a PicoScope 3224 or a PicoScope 3204A?

In PicoScope 6, have you used the View Properties window to confirm the number of samples and sample interval/rate as it should be?

Are you able to send a screenshot of the above and the data that is returned from your program?

Thanks,

Attila
Newbie
Posts: 0
Joined: Thu Sep 27, 2012 3:33 pm

Re: Traditional time/div conversion to samples

Post by Attila »

Hi Hitesh,

Thanks for your swift response again.
I use PicoScope 3204A (it's in my first message). I checked the sample rate in PicoScope 6 and it's 500 MS/s, much higher than what I read in that post... Reconfiguring the example code using this sample rate now I am getting the right figures. Thanks for that!
Can you help me to get the Y axis right as well? According to this post: www.picotech.com/support/post29545.html
The raw ADC count value has to be divided by the maximum count value and then multiply it by the selected voltage range. Is that right? And what is the maximum ADC count value for my device?

Cheers

Hitesh

Re: Traditional time/div conversion to samples

Post by Hitesh »

Hi Attila,

I wasn't sure between your first post and the link as to whether you have a 3204A or another scope - I was going to respond with a link to the specification page as the maximum sampling rate is 500MS/s with a single channel:

http://www.picotech.com/picoscope-specifications.html

The formula is correct - for example if your selected voltage range is +/- 1000mV, then the formula is:

Code: Select all

mV = (ADC Count / Max ADC Count) * 1000
There is a function in the API (ps3000aMaximumValue) which you can use to find the maximum ADC count (should be around 32512). Please refer to the Programmer's Guide in the SDK for further information.

Hope this helps.

Attila
Newbie
Posts: 0
Joined: Thu Sep 27, 2012 3:33 pm

Re: Traditional time/div conversion to samples

Post by Attila »

Hi Hitesh,

Everything works now, thanks for your help!

Attila

Post Reply