In the project I am working on, I am using a PicoScope 2204A and needs to trigger a random pulse to find the
pulse width and the mean amplitude of the pulse. I have been going through the programmer's guide for PicoScope 2000 series. Are there any predefined functions to do this task.
a. the frequency the pulses occurs
b. the shortest time between 2 successive pulses.
c. the sample rate you want to sample the events. (samples / second)
The pulses would occur randomly there is no particular frequency and the pulses can have a time seperation of 5 ms(can be more than that also). I would need to take samples per 1ms. For testing I would be generating a pulse with 30 ms pulse width and a amplitude about 13 V , so I should be able to detect this pulse and get the pulse width near to 30 ms from my program.
My guess is that you need to use streaming mode (the scope is not able to transmit a complete waveform in 5 ms)
Also after a trigger you want some extra samples at least the width of the widest possible pulse.
In this time a small pulse with a short pause can occur, so you have 2 pulses in a single capture.
I don't know of a measurement in PS software, that can do this (need to test with a generator)
If I had this problem I would go for the SDK in streaming mode and calculate the value of the pulse when they stream in memory. This way you are 100% sure you don't miss pulses and have 100% control of how the average value is calculated.
in streaming mode with the SDK you need to do everything yourselves (so look at every ADC value that comes from the scope and see if it is above or below your threshold 12V and then sum all the values that are above 12V until it falls below 12V then divide the sum by number of samples that are above 12V and that is your average value for that pulse.
Continue testing until the value is above 12V again en start summing again.
Do this over and over again until you stop sampling.
Sounds simple but is not simple if you do it for the first time, i done this on multiple problems and always liked the way I had control over the result. I have even done Realtime decoding of opentherm protocol.
Thank you for your help. Since currently my requirement changed to detecting only a single pulse, I was able to detect pulse using pulse width qualifier function used in advanced triggering. in the future if I am required to detect pulses at short intervals I would go for streaming mode.