Skip to main content

NI TestStand Semiconductor Module Python API

Project description

Build Status

nitsm-python

Write code modules with the TestStand Semiconductor Module in python.

Note to End Users

This project is intended for use in automated device validation. Our primary focus is to provide a pythonic approach to automated testing with TestStand and TSM. More emphasis has been placed on simplicity and usability than execution time.

Python Version Support

nitsm supports python versions 3.6, 3.7, and 3.8. Newer versions of python might work, but it is not guaranteed. Python 2.7 is not supported.

Installation

pip install nitsm

nitsm requires NI TestStand 20.0 or higher and NI TestStand Semiconductor Module 20.0 or higher.

To use nitsm in conjunction with nimi-python, you must also install the appropriate NI instrument driver for each device you plan to use:

Visit the nimi-python project for information on which python packages to install alongside each instrument driver.

Usage

Define code modules with the code_module decorator in the nitsm.codemoduleapi module. When called from TestStand, the decorator will convert the pywin32 COM object into an nitsm.codemoduleapi.SemiconductorModuleContext object.

import nidcpower
import nitsm.codemoduleapi

@nitsm.codemoduleapi.code_module
def source_current(tsm_context, pins, current_level):
    pin_query_context, sessions, channel_strings = tsm_context.pins_to_nidcpower_sessions(pins)
    for session, channel_string in zip(sessions, channel_strings):
        session.channels[channel_string].output_function = nidcpower.OutputFunction.DC_CURRENT
        session.channels[channel_string].current_level = current_level
        session.channels[channel_string].initiate()

Known Limitations

  • Instrument alarms are currently not supported
  • The Set Relays TestStand step is not supported when creating relay sessions in python
  • See STATUS.md for additional information about the current state of the API and system tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nitsm-0.2.0.tar.gz (32.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nitsm-0.2.0-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

Details for the file nitsm-0.2.0.tar.gz.

File metadata

  • Download URL: nitsm-0.2.0.tar.gz
  • Upload date:
  • Size: 32.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for nitsm-0.2.0.tar.gz
Algorithm Hash digest
SHA256 df87ad16d25330585ab335bf1c608647a2b9299f0b8ae2bb252bebee7c54927d
MD5 dfb2b64aa4f9315609cfcc48d1962b42
BLAKE2b-256 301aabd53fba13824f3b16b67a48427f92b04cf886cf6e1ce092c47a276ccecd

See more details on using hashes here.

File details

Details for the file nitsm-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: nitsm-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 33.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for nitsm-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9dc549f0fa6c664b4bd9e47dc25b02b426d36a96faf9300f33781308731356c
MD5 1c530b86d78ed8bd74af6bdeaa53c31d
BLAKE2b-256 9ccebb2401ea733ce87e856569ea1a286ee72a1dda246e88aa088cdf04b96f73

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page