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

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

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>