Automatic pulse width measurement

Post any questions you may have about our current range of oscilloscopes
Post Reply
Dirk123
Newbie
Posts: 0
Joined: Fri Dec 02, 2016 9:24 am

Automatic pulse width measurement

Post by Dirk123 »

Hi,

I am new here and have got a PicoScope 4000 series.

I have to measure pulse widths. Attached you see an example. Further there will be around 100 pulses to measure within one shot. So autamatic measurement would be a good idea :D .

My dream would be an output (csv or txt) of the full shot containing only:

Absolute time pulse width
... ...

One line one pulse.

Is there a way with a macro in PicoScope or something else (I tried already OO calc with a macro but it is slow and crashes)?

Thanks.

Best regards

Dirk
Attachments
Pulse width example
Pulse width example

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Automatic pulse width measurement

Post by Martyn »

In the example picture you have posted there are 12 pulses, so you are looking for a list containing 12 pulse widths.

Unfortunately that is not currently possible in the software, although we are looking at measurements for future releases.

If the period of the wave stays the same, and it is just the duty cycle that is changing, then you can plot this as a maths channel, Tools->MathChannels->Create duty(A) , and with a bit of scaling have this scale as time instead of %
Martyn
Technical Support Manager

Dirk123
Newbie
Posts: 0
Joined: Fri Dec 02, 2016 9:24 am

Re: Automatic pulse width measurement

Post by Dirk123 »

Hi Martyn,

thanks. Exact - 12 pulse widths for the example. The widths are different and in future there will be more than 100 pulses each shot.

Is it possible to write a program (e.g. c++, VB, Macro) for the PicoScope software on the PC doing that?

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Automatic pulse width measurement

Post by Martyn »

Yes it would be possible to write an application using the SDK to do this.

The key parts are knowing the sample interval, and then reading the data looking for the positive and negative transitions. You then just count the number of samples between these points to work out the pulse times. You will need to add in a little hysteresis checking so that noise doesn't provide you with a false crossing.
Martyn
Technical Support Manager

Dirk123
Newbie
Posts: 0
Joined: Fri Dec 02, 2016 9:24 am

Re: Automatic pulse width measurement

Post by Dirk123 »

Sounds good. Is it also possible to do this with a .psdata set? Would be better for me.

Do you have some code examples regarding this? Would be helpful :D

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Automatic pulse width measurement

Post by Martyn »

I don't have any examples for this, sorry.

With the psdata file you could load it up and then export as either csv, txt, or mat format and then process the resulting data file.

I will continue to push for this feature to be added to the software.
Martyn
Technical Support Manager

Post Reply