Skip to main content

NI-Sync Python API

Project description

Info Contains a Python API for interacting with NI-Sync. See GitHub for the latest source.
Author National Instruments

Table of Contents

About

The nisync package allows you to develop timing and synchronization applications for both time-based and signal-based synchronizations with NI-Sync devices in Python.

Documentation

Refer to the NI-Sync User Manual for API-agnostic information about NI-Sync concepts.

Implementation

The package is implemented in Python as an object-oriented wrapper around the NI-Sync C API using the ctypes Python library.

Supported NI-Sync Driver Versions

nisync supports all versions of NI-Sync. Some functions in the nisync package may be unavailable with earlier versions of NI-Sync driver. Refer to the Installation section for details on how to install the latest version of the NI-Sync driver.

Operating System Support

nisync supports Windows and Linux operating systems where the NI-Sync driver is supported. Refer to NI Hardware and Operating System Compatibility for which versions of the driver support your hardware on a given operating system.

Python Version Support

nisync supports CPython 3.8+ and PyPy3.

Installation

Running nisync requires NI-Sync to be installed. nisync can be installed with pip:

python -m pip install nisync

Manual Driver Installation

Visit ni.com/downloads to download the latest version of NI-Sync. None of the recommended Additional items are required for nisync to function, and they can be removed to minimize installation size. It is recommended you continue to install the NI Certificates package to allow your Operating System to trust NI built binaries, improving your software and hardware installation experience.

Getting Started

In order to use the nisync package, you must have at least one device that supports NI-Sync installed on your system. Both physical and simulated devices are supported. You can use NI MAX or NI Hardware Configuration Utility to verify and configure your devices.

Finding and configuring device name in NI MAX: NI Max Device Name

Finding and configuring device name in NI Hardware Configuration Utility: NI HWCU Device Name

Usage

The following is a basic example of using an nisync.nisync.Session object. This example illustrates how to connect and disconnect clock terminals to synchronize devices using the onboard oscillator as the clock source. This is particularly useful in applications requiring precise timing and synchronization across multiple devices.

Python Examples

import nisync
from nisync.constants import PXI_CLK10_IN, OSCILLATOR

# Create a new session with the nisync library
with nisync.Session(resource_name="PXI1Slot10") as session:
    # Connect the onboard oscillator to the PXI_CLK10_IN terminal
    # This setup is typically used for synchronizing measurements across devices
    session.connect_clock_terminals(OSCILLATOR, PXI_CLK10_IN)
    
    # Perform measurements or operations that require synchronization
    
    # Once operations are complete, disconnect the terminals
    session.disconnect_clock_terminals(OSCILLATOR, PXI_CLK10_IN)

License

nisync 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.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

nisync-0.1.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

nisync-0.1-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file nisync-0.1.tar.gz.

File metadata

  • Download URL: nisync-0.1.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.13

File hashes

Hashes for nisync-0.1.tar.gz
Algorithm Hash digest
SHA256 3768dffc1c549863bcf087eda105f2ba4de4ca9e3511d88a6ba1f69c845c541d
MD5 9d7345df240b8b4bcce37f6eb51dd844
BLAKE2b-256 5f679cf02ee414b9ba8dad9eea4d027b080f5db26959586fce2cc374ba8edc6b

See more details on using hashes here.

File details

Details for the file nisync-0.1-py3-none-any.whl.

File metadata

  • Download URL: nisync-0.1-py3-none-any.whl
  • Upload date:
  • Size: 26.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.13

File hashes

Hashes for nisync-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 24ce83b989988211473e27e3a9060d13d20b70d27049710b93ddf23542934c31
MD5 587328714a5ef9531ff4163795d0cd06
BLAKE2b-256 99fd9a87b4d2d7351269aab5a98e27c724887491e1846484243bf71dd6db24cd

See more details on using hashes here.

Supported by

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