Skip to main content

Python Interface for the DATAQ DI-2008 DAQ

Project description

DI2008-Python

About

Interface for the DI-2008 in Python.

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

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({
    <DI-2008 SERIAL NUMBER>: {
        DI2008Channels.CH1: (DI2008Layout.TC, DI2008TCType.K),
        DI2008Channels.CH3: (DI2008Layout.TC, DI2008TCType.N),
        DI2008UseDigital: True,
        }
    },
)

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

A path to a .toml or .json file can also be passed in, formatted with the same names:

[<DI-2008 SERIAL NUMBER>]
"DI2008Channels.CH1" = ["DI2008Layout.TC", "DI2008TCType.K"]
"DI2008Channels.CH3" = ["DI2008Layout.TC", "DI2008TCType.N"]
"DI2008UseDigital" = true

(Note that toml format will treat the dotted names like DI2008Channels.CH1 as dictionaries, so they must be in quotes. The parser does handle variations in capitalization, spacing, or use of hyphens and underscores)

Current Features:

  • Thermocouples
  • ADC Reading
  • Digital Reading
  • Changing Scan Rate, Decimation, and Filtering Mode
  • Automatic ChannelStretch Synchronized Initialization
  • Reading configuration from .json/.toml files as well as raw Python dictionaries
  • Enforce cleanup on stopping

Planned Features:

  • Changing Packet Rate Size
  • Interface with the info operator
  • CJCDelta
  • Rate Measurement
  • LED Color
  • Specify Digital Input as well as Output

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.1.2.tar.gz (12.0 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.1.2-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for di2008_python-1.1.2.tar.gz
Algorithm Hash digest
SHA256 d6ff576f3040ed129a07f3c90d64e80309f8eaab502107f08ee8da74d968df09
MD5 7ab50c4e8d69d8b8a6317d55d2e00b89
BLAKE2b-256 e4edd74250d579fe752c4da24ee29753d211c2d33e9abc2c92dbd96b1a331d35

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for di2008_python-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 59442961ffdbebb8f21ba5600709c7ddb3b193115b4c62fba60a0c7dd9a9a851
MD5 c5e7eeb417178414469055d5b471f3ca
BLAKE2b-256 dd73b2bb0c2dc96adcc931613f9d1e78b4ef4f10a681345b2382cfbf052c29f8

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