Test and Measurement Forum

Automatic pulse width measurement

Post any questions you may have about our current range of oscilloscopes

Automatic pulse width measurement

Postby Dirk123 » Fri Dec 02, 2016 9:51 am

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
Pulsebreite.jpg
Pulse width example
Dirk123
Newbie
 
Posts: 0
Joined: Fri Dec 02, 2016 9:24 am

Re: Automatic pulse width measurement

Postby Martyn » Mon Dec 05, 2016 9:10 am

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
Martyn
Site Admin
Site Admin
 
Posts: 2716
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Automatic pulse width measurement

Postby Dirk123 » Mon Dec 05, 2016 11:08 am

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?
Dirk123
Newbie
 
Posts: 0
Joined: Fri Dec 02, 2016 9:24 am

Re: Automatic pulse width measurement

Postby Martyn » Mon Dec 05, 2016 11:29 am

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
Martyn
Site Admin
Site Admin
 
Posts: 2716
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Automatic pulse width measurement

Postby Dirk123 » Mon Dec 05, 2016 12:44 pm

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
Dirk123
Newbie
 
Posts: 0
Joined: Fri Dec 02, 2016 9:24 am

Re: Automatic pulse width measurement

Postby Martyn » Thu Dec 22, 2016 10:31 am

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
Martyn
Site Admin
Site Admin
 
Posts: 2716
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots


Return to USB PC Oscilloscopes

Who is online

Users browsing this forum: No registered users and 0 guests