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:

Mark,

Bringing up an old topic.

With the Measurements API v2 out for almost a year now, would it be possible to add them by default to the next release?

I’ve created a tiny logic.bat file to run the few commands to enable the measurements API, but it leaves an ugly DOS window with plenty of debug printf()s.

Over the last couple of weeks I’ve been using the Logic Pro 16 to record and measure some analog signals on a customers hw, and having to remember to open the Logic SW this way (and not just double-clicking a .sal file) gets old relatively quick.

FWIW; I’ve mostly been using the Vpp and Vrms measurements and while they can take a while to calculate, based on the amount of data, they appear solid.

Also, is there any ETA for the next (v2.4.8?) release? there was a flurry of releases, but that dried up with v2.4.7.

@Kai Sorry for the long silence on this topic! You’re right, the Measurements API v2 is still in preview-release, and we’re likely still planning on making breaking changes before it’s finalized. Our software team has been prioritizing other projects since we got started on this, but I’ll bring up your note about this with them. I’ll also check in with them on an update with regards to 2.4.8 as well.

Hi Kai,

Thanks for asking.

With the Measurements API v2 out for almost a year now, would it be possible to add them by default to the next release?

I’ve created a tiny logic.bat file to run the few commands to enable the measurements API, but it leaves an ugly DOS window with plenty of debug printf()s.

I know we pushed out the preview of measurements and basically dropped it. In reality, its release has been attached to the release of another related large feature, and they will end up going out together. Unfortunately that’s a little ways out at the moment and I can’t comment on the release date.

In the meantime, I recommend just setting the environment variable globally on your PC. This way you will no longer need a launcher script.

Also, is there any ETA for the next (v2.4.8?) release? there was a flurry of releases, but that dried up with v2.4.7.

Yes, and sorry for the delay! A lot has happened since 2.4.7. We’ve overhauled our build system, and we’re also finally officially releasing native Apple Silicon support. It will also include a ton of small changes.

My hope is a Monday release next week, if we don’t find any issues in testing. It might be a little later than that.