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

2 Comments


  1. Kenneth Griffin
    Posted May 20, 2019 at 11:44 am Permalink

    There seems to be a problem with the Python program for the DI1120. i follow the instructions to uncomment 1120’s slist and analog ranges. and then i comment out the other slist and analog ranges.
    i also have a Di1100 where the python program works perfectly, but i need the DI1120 to work.

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>