Python Measurements API V2 preview

Python Measurements API Update Preview

Hello all,

With software release 2.3.49 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:).

Because this is pre-release, the API is subject to change. We don’t allow measurements using this API to be published in the marketplace yet, because we may break the API. Once the production version is released, we’ll allow them in the marketplace.

Measurements V2

We’ve expanded the capabilities of the Measurement API with a focus on Analog channels as part of a longer term product development plan to help our customers verify, debug and test analog problems such as signal integrity issues and many more. Please keep in mind that this API is a preview-release, and we’re planning on making breaking changes before it’s finalized. Because of this, measurements utilizing the new API can’t be published to the marketplace. We’d love to hear your feedback on these changes.

  • Measurements now include the ability to display annotations to help visually aid in the understanding of a measurement. We currently support showing or hiding annotations for all measurements enabled for a range.
  • Each range can have its own set of measurements
  • We’ve updated the styling of measurements in the sidebar
  • The measurement API has new capabilities more details can be found here
    Note: In order to test the new capabilities of the Measurement API you will need to set an environment variable in your shell or command prompt and start the app from the terminal.

This feature is OFF by default, and needs to be turned on by setting an environment variable before launching the software. The easiest way to do this is by using the terminal to first set the environment variable, then open the software. Note - setting an environment variable from the terminal is temporary, and only applies to programs launched from that terminal instance after the variable is set. You will have to repeat this each time you want to launch the app. (using a simple script, or setting the environment variable globally, would remove this requirement)

Windows:
If using Command Prompt (search for “command prompt” on the start menu, then type the following two commands.)

    set ENABLE_MEASUREMENTS_V2=1
    C:\Program Files\Logic\Logic.exe

If using Powershell:

    $env:ENABLE_MEASUREMENTS_V2=“1”
    C:\Program Files\Logic\Logic.exe

Mac:

    export ENABLE_MEASUREMENTS_V2=1
    /Applications/Logic2.app/Contents/MacOS/Logic

Linux:

    export ENABLE_MEASUREMENTS_V2=1
    ./Logic-2.3.48-master.AppImage

Note - we called this V2 all the way through the development, but when we finally set the version, we decided to use 1.1.0, rather than 2.0.0, since it didn’t break the old API.

Documentation

You can find API docs here. We need to do some work to build that out, there isn’t enough there yet.
https://saleae.github.io/apidocs/api_measurements.html

The best way to get started is probably to review and copy from our example measurement, which you can find here: