Skip to main content

Python Interface for the DATAQ DI-2008 DAQ

Project description

DI2008-Python

About

Interface for the DI-2008 in Python. Version 1.2.0

Python 3.10+

Modified from original interface in Python by DATAQ Instruments under MIT License

Maintainer: Clark Hensley ch3136@msstate.edu

Getting Started

Install via pip from PyPI:

pip install di2008-python

See Available DI-2008s:

from di2008_python import print_all_daq_metadata
print_all_daq_metadata()

Instantiate DI2008 Object with Dictionary of Parameters:

from di2008_python import DI2008, DI2008Channels, DI2008Layout, DI2008TCType

# Enable the DI-2008 with a K-Type thermocopule in Analog Channel 1, an N-Type Thermocouple in Analog Channel 3, and the Digital Channel active
di2008 = DI2008({
        # Global Settings
        DI2008GlobalAnalogLayout: (DI2008Layout.TC, DI2008TCType.K)
        DI2008GlobalScanRateSettings.SRATE: 4,
        DI2008GlobalScanRateSettings.DEC: 1,
        DI2008GlobalScanRateSettings.FILTER: {
            DI2008AllChannels: DI2008FilterModes.AVERAGE,
            },
        # Serial Numbers of DAQs to apply
        DI2008GlobalSerialNums: [<DI-2008 Serial Num>, <DI-2008 Serial Num>, ...],
        # Overwriting settings for a given DI-2008
        <DI-2008 Serial Num>: {
            DI2008Channels.CH1: (DI2008Layout.TC, DI2008TCType.N),
            DI2008GlobalScanRateSettings.FILTER: {
                DI2008Channels.CH1: DI2008FilterModes.LAST_POINT,
                }
            }

This interface uses named enumerations to ensure that what settings are being used is clear and concise

Current Features:

  • Thermocouples
  • ADC Reading
  • Changing Scan Rate, Decimation, and Filtering Mode
  • Automatic ChannelStretch Synchronized Initialization
  • Enforce cleanup on stopping
  • Changing Packet Size
  • Interface with the info operator

Planned Features:

  • Reading configuration from .json/.toml files as well as raw Python dictionaries
  • Digital Channels
  • Specify Digital Input as well as Output
  • CJCDelta
  • Rate Measurement
  • LED Color

Further information about the DI-2008 can be found on DATAQ's website and via the DI-2008 Protocol.

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

di2008_python-1.2.1.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

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

di2008_python-1.2.1-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file di2008_python-1.2.1.tar.gz.

File metadata

  • Download URL: di2008_python-1.2.1.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.12

File hashes

Hashes for di2008_python-1.2.1.tar.gz
Algorithm Hash digest
SHA256 7f72eab473df79c01e23db7aa43f3bb7198a34790fef1af4622d70cbb57abb2c
MD5 a6e646c2756fc00e9b7732f85439f931
BLAKE2b-256 fa4bd3ef741d9582723f5b39c093fb47409a3292a03991af2c441d3cae248034

See more details on using hashes here.

File details

Details for the file di2008_python-1.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for di2008_python-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4b99d484536470b0b458cf3c287489940d0fbf2015012b2dd521a9f31b3f3a35
MD5 7e8d1e03860f0ce9ec9f229fc4ff62b5
BLAKE2b-256 2f79956534253f90cfcd35343055906162646575c39e688d98fed4d29080dd13

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