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.0.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.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: di2008_python-1.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 b8e0f39327b7af91d084b1e302d00e5422d35369f04277aceac79535ff6fe802
MD5 83a306b988fb2fda05723b6e3b3a8ac8
BLAKE2b-256 39f6811a2ff9bb18823fe962bc5403ec4fcb80165545a1aa823f0f61f13605ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for di2008_python-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 43d7089ad6d8a83376726e4ce264c9cc3d830a82ae131c7c45964cf58f994ae8
MD5 5c49a9c63501717430fa721953843ca0
BLAKE2b-256 06f8142172a7727401a9aad9f55853f59722fc51d3374c0241bbffa6e634ed84

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