Skip to main content

Overall Status

master branch status

Build Status - master branch Documentation Status - master branch MIT License Test Coverage - master branch

GitHub status

Open Issues + Pull Requests Open Pull Requests

Info

Python bindings for NI Modular Instrument drivers. See GitHub for the latest source.

Author

National Instruments

NI Digital Multimeter with Python logo

About

The nimi-python repository generates Python bindings (Application Programming Interface) for interacting with the Modular Instrument drivers. Currently, the following drivers are supported:

  • NI-DCPower (Python module: nidcpower)

  • NI-DMM (Python module: nidmm)

  • NI-FGEN (Python module: nifgen)

  • NI-SCOPE (Python module: niscope)

  • NI-SWITCH (Python module: niswitch)

  • NI-ModInst (Python module: nimodinst)

It is implemented as a set of Mako templates and per-driver metafiles that produce a Python module for each driver. The driver is called through its public C API using the ctypes Python library.

nimi-python supports all the Operating Systems supported by the underlying driver.

nimi-python supports Python 2.7, 3.4 and later using CPython or PyPy.

NI-SCOPE Python API Status

NI-SCOPE (niscope)

Driver Version Tested Against

17.0.2

PyPI Version

Latest NI-SCOPE Version

Supported Python Version

NI-SCOPE supported Python versions

Open Issues

Open Issues + Pull Requests for NI-SCOPE

Open Pull Requests

Pull Requests for NI-SCOPE

Installation

As a prerequisite to using the niscope module, you must install the NI-SCOPE runtime on your system. Visit ni.com/downloads to download the driver runtime for your devices.

The nimi-python modules (i.e. for NI-SCOPE) can be installed with pip:

$ python -m pip install niscope

Or easy_install from setuptools:

$ python -m easy_install niscope

Contributing

We welcome contributions! You can clone the project repository, build it, and install it by following these instructions.

Usage

The following is a basic example of using the niscope module to open a session to a High Speed Digitizer and capture a single record of 1000 points.

import niscope
with niscope.Session("Dev1") as session:
    session.configure_vertical(range=1.0, coupling=niscope.VerticalCoupling.AC)
    session.configure_horizontal_timing(min_sample_rate=50000000, min_num_pts=1000, ref_position=50.0, num_records=1, enforce_realtime=True)
    with session.initiate():
        wfm, wfm_infos = session[args.channels].fetch(num_samples=args.length)
    print('Number of samples acquired: {:,}\n'.format(len(wfm)))

Additional examples for NI-SCOPE are located in src/niscope/examples/ directory.

Support / Feedback

The packages included in nimi-python package are supported by NI. For support, open a request through the NI support portal at ni.com.

Bugs / Feature Requests

To report a bug or submit a feature request, please use the GitHub issues page.

Information to Include When Asking for Help

Please include all of the following information when opening an issue:

  • Detailed steps on how to reproduce the problem and full traceback, if applicable. Code samples are encouraged!

  • The python version used:

    $ python -c "import sys; print(sys.version)"
  • The module (i.e. nidmm) and its version:

    $ python -m pip list
  • The version of the driver used (i.e. NI-DMM 17.1). Follow this KB article to determine the version you have installed.

  • The operating system, version, and bitness. For example 64-bit Windows 7.

Documentation

Documentation is available here.

License

nimi-python is licensed under an MIT-style license (see LICENSE). Other incorporated projects may be licensed under different licenses. All licenses allow for non-commercial and commercial use.

Download files

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

Source Distribution

niscope-0.7.0.tar.gz (52.3 kB view details)

Uploaded Source

Built Distribution

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

niscope-0.7.0-py2.py3-none-any.whl (57.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file niscope-0.7.0.tar.gz.

File metadata

  • Download URL: niscope-0.7.0.tar.gz
  • Upload date:
  • Size: 52.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for niscope-0.7.0.tar.gz
Algorithm Hash digest
SHA256 bedf0ac1659ff45d436b59cd1156a786fcbda86be851e00b0d61ccde4161a14c
MD5 8ed286dfe166d92a135389e1bf115987
BLAKE2b-256 1c15de3e6583a72aa476949c092acf55a7aa9e28be9ce4947509415b5d0e32b4

See more details on using hashes here.

File details

Details for the file niscope-0.7.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for niscope-0.7.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c22904e89f3d7f8ba0da8bc103e8f458eb4f91606ea88ec4c2935cd81e5a2b26
MD5 143cc742276d165e8b55ab6b4a1781ae
BLAKE2b-256 5ee1ac5595305a8b39b3e5ef6e6b774db45e9c0606388a3ba1a5d33a561110da

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