# How to search for/find pulses that are longer than a given duration in a digital capture?

**URL:** <https://discuss.saleae.com/t/how-to-search-for-find-pulses-that-are-longer-than-a-given-duration-in-a-digital-capture/2282>\
**Category:** Logic 1.x  (Legacy) Software\
**Created:** [June 15, 2023, 8:55pm UTC](https://discuss.saleae.com/t/how-to-search-for-find-pulses-that-are-longer-than-a-given-duration-in-a-digital-capture/2282 "2023-06-15T20:55:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdbbs](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@sdbbs](https://discuss.saleae.com/u/sdbbs)\
**Post date:** [June 15, 2023, 8:55pm UTC](https://discuss.saleae.com/t/how-to-search-for-find-pulses-that-are-longer-than-a-given-duration-in-a-digital-capture/2282/1 "2023-06-15T20:55:11Z")

</div>

Let’s say I have a a digital capture of a channel, resulting with many thousands of positive pulses in duration anywhere between 5 us and 40 us in a 30 second capture - and I would like to find - and visually indicate - all pulses that have a duration greater than or equal to 30 us. Is it possible to do in Saleae Logic software (I use v1 still, but it would be good to know if v2 has something for this)?

If I use a measurement, I can have written out what is the max positive pulse duration ( “Maximum Pos Pulse” ) - but I will not get a visual indication of _where_ in the capture that pulse is.

So, I guess for such markings - multiple ones even - one would have to use analyzer? In that case, is there an existing analyzer that would accept a specification like “positive pulse duration \>= 30 us”, and then mark those pulses that fit the description/search query?

---

<div class="post-metadata">

**Author:** ![markgarrison](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/markgarrison/32/23_2.png) [@markgarrison](https://discuss.saleae.com/u/markgarrison)\
**Post date:** [June 20, 2023, 10:13pm UTC](https://discuss.saleae.com/t/how-to-search-for-find-pulses-that-are-longer-than-a-given-duration-in-a-digital-capture/2282/2 "2023-06-20T22:13:29Z")

</div>

Great question.

We did release a “preview” version of measurements V2 in our Logic 2 software which does support annotations, unfortunately we only released it for analog measurements. We plan to get back to this, but we don’t have plans to add annotation support to digital yet.

> [@Python Measurements API V2 preview](https://discuss.saleae.com/t/python-measurements-api-v2-preview/1766):
>
> Python Measurements API Update Preview Hello all, With software release [2.3.49](https://discuss.saleae.com/t/logic-2-3-49/1538) and newer, we rolled out a preview version of the new measurement API, which can be activated with an extra step when launching the software. This information got a bit lost in the release notes, so I’m creating a dedicated post here. We would love to collect as much feedback as possible about the new API changes, with the plan of making changes and releasing it for production use in a few months (crossed_fingers)…

The more direct solution to this would be to write a C++ analyzer plugin instead, which can add little markers to any positions on the digital channel you like, such as the dots we add to the async serial analyzer, or the arrows we add to the clock edges for the I2C and SPI analyzers.  
Technically this API supports Logic 1 and Logic 2, however the official examples now only support Logic 2. It would be pretty easy to back-port to Logic 1, as long as FrameV2 features are not used.

details here: [Protocol Analyzer SDK | Saleae Support](https://support.saleae.com/saleae-api-and-sdk/protocol-analyzer-sdk)
