Site Search:

Python Support for the Latest Generation of DATAQ Products

FacebooktwitterredditlinkedinmailFacebooktwitterredditlinkedinmail

Python for Data Acquisition Applications

DATAQ Instruments is pleased to offer Python programming support for model DI-245, DI-2008, DI-1100, DI-1110, DI-1120, DI-2108, DI-4108, DI-4208 and the upcoming DI-4718B.

Python is a popular high level programming language, with a large and enthusiastic user base. When used in conjunction with the latest generation of DATAQ Instruments data loggers, Python allows you to create customer data acquisition and analysis applications for your specific needs. With a fully documented protocol and a series of well commented example programs, even a novice Python programmer will be able acquire, store and manipulate data using Python and any supported DATAQ Instruments data acquisition instrument.

Sample Python code for Dataq Instruments devices

Getting Started

Dataq Instruments GitHub RepositoryExample programs are downloadable from the DATAQ Instruments GitHub page. GitHub features an eclectic online community of 31 million developers, sharing ideas, networking and reviewing code in a free and open forum.

On our GitHub page you’ll find example programs written specifically for the DI-245, DI-2008, DI-1100 and DI-1110. A ‘universal’ DataqStarterKit.py example program is used to demonstrate Python programming for the DI-1120, DI-2108, DI-4108, DI-4208 and DI-4718B. Requisite drivers for these products can also be found on the GitHub page.

In all cases, begin by disconnecting any DATAQ devices that you do not intend use with a particular example program. This will prevent the program from detecting the wrong vendor identification (VID) number. 

Next you’ll need to ensure that the instrument is placed in CDC communication mode. For guidance, go to: https://www.dataq.com/blog/data-acquisition/usb-daq-products-support-libusb-cdc/

Finally, in the case of DI-245, DI-2008, DI-1100 and DI-1110 series instruments (placed in CDC mode), simply run the instrument-specific example program.

In the case of the DI-1120, DI-2108, DI-4108, DI-4208 and DI-4718B (using the DataqStarterKit.py example), you’ll first need to uncomment the appropriate slist and analog_ranges sections of the program.

Uncommented Python sections

Note that protocol documentation for any of the products mentioned above can be found on their corresponding product pages under ‘Details’.

 

Follow Us
FacebooktwitterlinkedinyoutubeFacebooktwitterlinkedinyoutube

 Categories: Programming

 Tags: , , ,

 Bookmark the permalink

 RSS Feed (comments for this post)

 Post a comment

 Trackback URL

11 Comments

  1. Posted May 30, 2019 at 3:49 pm Permalink

    Kenneth,

    Please submit a support ticket to resolve this and similar issues.

    You can submit a support ticket at:
    https://help.dataq.com/portal/newticket/

    Regards,
    Shawn MacDonald
    Application Engineer
    DATAQ Instruments Inc.

  2. Posted April 3, 2020 at 5:32 pm Permalink
  3. Avatar
    Laurie Steven
    Posted August 16, 2020 at 2:35 am Permalink

    I am logging 10 hrs of respiratory data at 10S/s for a DI-1100.

    Is it possible to compute and display resp rate as the data is being acquired ?
    If so what is the preferred method/software to use ? eg. Python, Matlab etc.
    Thanks.

    • Posted October 5, 2020 at 10:01 am Permalink

      Hello Laurie,

      To acquire rate, you might consider the DI-2108, with four analog voltage inputs (expandable to eight) and a built-in Rate channel.

      WinDaq data acquisition software is included at no additional charge.

      You’ll find the DI-2108 on our website at:
      https://www.dataq.com/products/di-2108/

      Regards,
      Shawn MacDonald
      Application Engineer
      DATAQ Instruments Inc.

    • Posted June 28, 2021 at 1:54 pm Permalink

      Laurie,

      While the DI-1100 does not have a rate channel, you can use the Frequency acquisition method on one of the analog inputs to acquire rate.

      To do so, you’ll first need to uncheck the ‘Auto’ option in the ‘Maximum Sample Rate’ dialog box (Edit>>Preferences>>Maximum Sample Rate).

      You’ll find a document on using the Frequency acquisition method at:
      https://www.dataq.com/data-acquisition/general-education-tutorials/frequency-true-rms-daq.html

      Regards,
      Shawn MacDonald
      Application Engineer
      DATAQ Instruments Inc.

  4. Avatar
    Gary Floyd
    Posted January 15, 2021 at 11:20 am Permalink

    I have two DI1100s. One of them is working just fine. It switches to CDC with no problems. The other unit will not switch to CDC. Tried both continuous hold of Event button and rapid pushing of the button. By the way the one that does work requires the rapid pushing instead of continuous holding. The one that doesn’t work goes blue instead of red on the active led. Thoughts?

    • Posted June 28, 2021 at 2:07 pm Permalink

      Hello Gary,

      Please send a complete shipping address to smacdonald@dataq.com and we’ll send out a complementary DI-1100.

      Regards,
      Shawn MacDonald
      Application Engineer
      DATAQ Instruments Inc.

  5. Avatar
    andres jhonatan
    Posted February 9, 2022 at 3:46 pm Permalink

    buenas tardes, dias, noches, tengo u DI 718B como seria el programa en phyton para este modelo?

  6. Avatar
    Gary
    Posted April 20, 2022 at 9:56 am Permalink

    I have two DI1100. They are running on Python. One works perfectly collecting 20 samples/second. The other, running on the same computer/software/cables, collects 1.33 samples/second. They both need to collect 20 samples/second. Any thoughts?

  7. Avatar
    Lewis Simms
    Posted December 7, 2022 at 5:23 pm Permalink

    I am a graduate student who is unfamiliar with using serial commands to collect analog data. I am using a Model 2108 DAQ with a pressure transducer as part of my thesis and need to integrate all of my data collection in a python algorithm.

    From the GitHub examples I found, I did not see anything about converting the raw digital or analog pressure data. Is there anywhere I can find help or examples of how to use the factory calibration used by Windaq to convert the raw data through python?

    Thanks.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>