Skip to content

Releases: ni/measurement-plugin-python

MeasurementLink Support for Python v1.2.0-dev3

25 Sep 21:59
8fa8137
Compare
Choose a tag to compare

What's Changed

  • Bug fixes
    • Fix the discovery service to not terminate on parent process closure by @samchris007 in #391
    • Importing nidcpower.session into output voltage measurement (#399) by @DelpireNI in #406
    • Fix pywintypes error during the launch of the discovery service after a fresh install of MeasurementLink by @samchris007 in #407
    • Update reserve_session to roll back on error (#401) by @bkeryan in #409

Full Changelog: 1.2.0-dev2...1.2.0-dev3

MeasurementLink Support for Python v1.2.0-dev2

19 Sep 16:45
583003d
Compare
Choose a tag to compare

What's Changed

  • Support for Python services returning DoubleXYData
  • Examples
    • Configure mypy for all examples to disallow untyped function definitions by @bkeryan in #372
    • Use a threading.Event for cancellation instead of a local callback function and nonlocal variable.
    • Consistently use the name measurement_service for the measurement service variable.
  • Misc improvements and refactoring

Full Changelog: 1.2.0-dev1...1.2.0-dev2

MeasurementLink Support for Python v1.2.0-dev1

05 Sep 19:16
eb49197
Compare
Choose a tag to compare

What's Changed

  • Improved support for automatically launching the discovery service
  • Preparation for supporting more data types by @dixonjoel in #352 #354 #357
  • Improved logging and ETW tracing by @bkeryan in #347 #361
  • Fix mypy errors with types-protobuf 4.24 by @bkeryan in #362
  • Examples
    • Add measurement example involving NI-DCPower and NI-VISA DMM instruments by @samchris007 in #323
    • Update examples to centralize USE_SIMULATION in _constants.py by @dixonjoel in #348
    • Read serviceconfig path from __file__ or exe location by @DelpireNI in #355
    • Remove unused TypeVar from _helpers.py by @dixonjoel in #363
    • Make enum zero translation more readable by @bkeryan in #365

Full Changelog: 1.2.0-dev0...1.2.0-dev1

MeasurementLink Support for Python v1.2.0-dev0

01 Aug 17:43
3e0ded3
Compare
Choose a tag to compare

What's Changed

  • Added support for service annotations by @gpachecoNI in #291 #294 #296 #338
    • The .serviceconfig file now supports specifying additional information about the measurement via the annotations dictionary.
    • Example:
      "annotations":
      {
        "ni/service.description": "Measure inrush current with a shorted load.",
        "ni/service.collection": "CurrentTests.Inrush",
        "ni/service.tags": [ "powerup", "current" ]
      }
    
    • ni-measurementlink-generator now supports generating the annotations dictionary. By default, it sets ni/service.description, ni/service.collection, and ni/service.tags to empty values. You can specify values with the --description, --collection, and --tags command line options.
  • Added support for protobuf enums by @WesleyTangNationalInstruments in #328
    • The protobuf generated code for enums does not use the Python enum module. Instead, it uses integers and provides a subclass of EnumTypeWrapper describing the enum value mapping.
    • When you use the configuration and output decorators to specify measurement parameters, you can now specify either an enum.Enum subclass or an EnumTypeWrapper instance for enum_type.
  • Improved support for automatically launching the discovery service
    • When a python measurement starts discovery service, hide discovery service logs by @vigkre in #343
    • Fix auto-launching discovery service producing a ResourceWarning by @vigkre in #344
  • Examples
  • Minor updates and improvements not listed here

New Contributors

Full Changelog: 1.1.0...1.2.0-dev0

MeasurementLink Support for Python v1.1.0

12 Jul 22:29
Compare
Choose a tag to compare

What's Changed

  • Added support for updating the measurement UI during a measurement.
    • To send UI updates while the measurement is running, use the yield keyword instead of the return keyword to "return" the measurement's output tuple. This turns the measurement function into a Python generator function, which allows it to "return" the output tuple multiple times.
    • When using yield, it is not necessary to use return. If you use both yield and return, MeasurementLink treats the return like a final yield.
    • This feature is intended for interactive usage with InstrumentStudio. In TestStand, only the final UI update is returned.
    • This feature requires MeasurementLink 2023 Q3.
  • Added support for enums.
    • To use an enum type for a configuration or output, pass nims.DataType.Enum for the data type and specify the enum_type keyword argument.
    • Example: @measurement_service.configuration("measurement_type", nims.DataType.Enum, Function.DC_VOLTS, enum_type=Function)
    • This feature requires MeasurementLink 2023 Q3.
  • Added support for version 2 of the MeasurementService interface.
    • This is required for both the UI update and enum features.
    • ni-measurementlink-service now reads the service's provided interfaces from the .serviceconfig file. When you update your services to depend on ni-measurementlink-service version 1.1 or later, you should update their .serviceconfig files to specify both versions of the measurement service interface:
        "providedInterfaces": [
          "ni.measurementlink.measurement.v1.MeasurementService",
          "ni.measurementlink.measurement.v2.MeasurementService"
        ],
    
  • Manually launching a measurement service now automatically starts the discovery service just-in-time by @vigkre in #290
  • Example improvements:
    • Simplified TestStand sequences by reducing the number of setup/cleanup steps and moving them into the main sequence.
    • Refactored command line option handling to reduce amount of boilerplate in measurement.py.
    • Added a nidigital_spi example.
    • Updated modular instrument examples to use session-based simulation by default.
    • Add a ui_progress_updates example by @bkeryan in #266
    • Update the nidaqmx_analog_input_measurement example to use the NI gRPC Device Server and MeasurementLink Session Management Service by @samchris007 in #268
    • Update docs to redirect users to the appropriate release by @bkeryan in #265
    • Use NXG/fuse controls for LabVIEW measurement UIs by @pbirkhol-ni in #272
    • Added common helper method to reserve and create session for NI-DCPower Example by @vigkre in #263
    • Update other examples to match NI-DCPower example changes. by @subash-suresh in #284
    • Create predictable Streaming Measurement example and write automated tests by @DelpireNI in #279
    • Disable result recording in Setup and Cleanup block steps by @Tharun-Sundar in #278
    • NI-Digital: Use timing and levels sheet names rather than paths by @jonathanmendez in #282
    • Add helper to get session information based on pin name by @subash-suresh in #276
    • Simplify reserve call by extracting reservation timeout constant by @bkeryan in #300
    • Add helper to get session information based on pin name by @subash-suresh in #276
    • Update Example Services' TestStand Sequences for Enum Support by @WesleyTangNationalInstruments in #295
  • Simplify single-session measurements by @bkeryan in #287
    • The SessionManagementClient class now has a singular reserve_session() method, in addition to the plural reserve_sessions() method.
    • reserve_session() validates that exactly one session was reserved and returns a SingleSessionReservation object, where reservation.session_info is a single SessionInformation object.
    • reserve_sessions() allows reserving any number of sessions and returns a MultiSessionReservation object, where reservation.session_info is a list of SessionInformation objects.
  • ni-measurementlink-generator
  • Type checking and auto-complete improvements
    • Added a py.typed marker, which indicates that ni-measurementlink-service supports type checking with tools such as mypy and pyright.
    • Use grpc-stubs for type information by @bkeryan in #275
    • Add missing type info to MeasurementContext & use correct types by @bkeryan in #281
    • Fix imports in .pyi type stubs by @bkeryan in #280
    • Generate .pyi type stubs for gRPC client stub classes by @bkeryan in #292
  • bugfix: 'gbk' codec can't decode byte by @LawsonGu in #240
  • Various minor bug fixes and improvements not listed here

New Contributors

Full Changelog: 1.0.1...1.1.0

MeasurementLink Support for Python v1.1.0-dev2

26 Jun 21:34
5fbe78b
Compare
Choose a tag to compare

What's Changed

  • Added support for enums by @WesleyTangNationalInstruments in #288
    • To use an enum type for a configuration or output, pass nims.DataType.Enum for the data type and specify the enum_type keyword argument.
    • Example: @measurement_service.configuration("measurement_type", nims.DataType.Enum, Function.DC_VOLTS, enum_type=Function)
  • ServiceInfo now gets the provided interfaces from the .serviceconfig file by @DelpireNI in #274
  • Example improvements
    • Use NXG/fuse controls for LabVIEW measurement UIs by @pbirkhol-ni in #272
    • Added common helper method to reserve and create session for NI-DCPower Example by @vigkre in #263
    • Update other examples to match NI-DCPower example changes. by @subash-suresh in #284
    • Create predictable Streaming Measurement example and write automated tests by @DelpireNI in #279
    • Disable result recording in Setup and Cleanup block steps by @Tharun-Sundar in #278
    • NI-Digital: Use timing and levels sheet names rather than paths by @jonathanmendez in #282
    • Add helper to get session information based on pin name by @subash-suresh in #276
    • Simplify reserve call by extracting reservation timeout constant by @bkeryan in #300
  • Simplify single-session measurements by @bkeryan in #287
    • The SessionManagementClient class now has a singular reserve_session() method, in addition to the plural reserve_sessions() method.
    • reserve_session() validates that exactly one session was reserved and returns a SingleSessionReservation object, where reservation.session_info is a single SessionInformation object.
    • reserve_sessions() allows reserving any number of sessions and returns a MultiSessionReservation object, where reservation.session_info is a list of SessionInformation objects.
  • ni-measurementlink-generator
  • Type checking and auto-complete improvements
    • Use grpc-stubs for type information by @bkeryan in #275
    • Add missing type info to MeasurementContext & use correct types by @bkeryan in #281
    • Fix imports in .pyi type stubs by @bkeryan in #280
    • Generate .pyi type stubs for gRPC client stub classes by @bkeryan in #292
  • Various minor bug fixes and improvements not listed here

Full Changelog: 1.1.0-dev1...1.1.0-dev2

MeasurementLink Support for Python v1.1.0-dev1

18 May 21:55
6c9e60c
Compare
Choose a tag to compare

This is a prerelease of MeasurementLink Support for Python (ni-measurementlink-service) version 1.1.0.

Documentation on using this package can be found in the README.

What's Changed

  • Examples:
    • Add a ui_progress_updates example by @bkeryan in #266
    • Update the nidaqmx_analog_input_measurement example to use the NI gRPC Device Server and MeasurementLink Session Management Service by @samchris007 in #268
    • Update docs to redirect users to the appropriate release by @bkeryan in #265

Full Changelog: 1.1.0-dev0...1.1.0-dev1

MeasurementLink Support for Python v1.1.0-dev0

08 May 22:11
b9442f4
Compare
Choose a tag to compare

This is a prerelease of MeasurementLink Support for Python (ni-measurementlink-service) version 1.1.0.

Documentation on using this package can be found in the README.

What's Changed

  • Added support for measurement_service.proto version 2.
  • Added support for updating the measurement UI during a measurement. This feature requires MeasurementLink 2023 Q3, which is not released yet.
  • Added a py.typed marker, which indicates that ni-measurementlink-service supports type checking with tools such as mypy.
  • Example improvements:
    • Simplified TestStand sequences by reducing the number of setup/cleanup steps and moving them into the main sequence.
    • Refactored command line option handling to reduce amount of boilerplate in measurement.py.
    • Added a nidigital_spi example.
    • Updated modular instrument examples to use session-based simulation by default.
  • bugfix: 'gbk' codec can't decode byte by @LawsonGu in #240
  • Various minor bug fixes and improvements

New Contributors

Full Changelog: 1.0.1...1.1.0-dev0

MeasurementLink Support for Python v1.0.1

24 Mar 16:32
3716ccc
Compare
Choose a tag to compare

MeasurementLink Support for Python (ni-measurementlink-service) is a Python framework that enables measurement developers to quickly create Python measurements and run them as a service (gRPC).

What's Changed

  • Various minor bug fixes and improvements

Full Changelog: 1.0.0...1.0.1

Dependencies

Installation

Make sure the system has the recommended Python version installed.

Install the latest NIMS Framework using pip.

REM Activate the required virtual environment if any.
pip install ni-measurementlink-service

Install the ni-measurementlink-generator to create measurement services

REM Activate the required virtual environment if any.
pip install ni-measurementlink-generator

MeasurementLink Support for Python v1.0.0

21 Feb 20:16
8a8adbf
Compare
Choose a tag to compare

MeasurementLink Support for Python (ni-measurementlink-service) is a Python framework that enables measurement developers to quickly create Python measurements and run them as a service (gRPC).

What's Changed

  • Update Development Status to Production / Stable

Full Changelog: 0.12.2...1.0.0

Dependencies

Installation

Make sure the system has the recommended Python version installed.

Install the latest NIMS Framework using pip.

REM Activate the required virtual environment if any.
pip install ni-measurementlink-service

Install the ni-measurementlink-generator to create measurement services

REM Activate the required virtual environment if any.
pip install ni-measurementlink-generator