Python™ Support for MCC DAQ Products

 

Python™ Support for MCC DAQ Products

Python Support for MCC DAQ Products

 

 

KEY HIGHLIGHTS

Python is a powerful object-oriented programming language. Many MCC products – including most USB, Ethernet™, and Bluetooth® hardware – are supported under the open-source MCC Universal Library Python API for Windows. Linux support is available as part of the MCC Universal Library for Linux package.

The mcculw package contains an API (Application Programming Interface) for interacting with Universal Library in Windows.

The uldaq package contains an API for interacting with Universal Library for Linux.

Both packages are implemented in Python as a wrapper around the Universal Library C API using the ctypes Python Library. Both were developed and are supported by MCC.

Source code and examples are available in the MCC GitHub repository:
www.github.com/mccdaq

Contact MCC directly for products not listed.



Part Number Description Qty Price
Python Support for MCC DAQ Products
Python™ is a powerful object-oriented programming language. Open-source Python™ support is available for many MCC DAQ products.

Product Reviews


2 / 5
Ease of Use
2 / 5
Value
2.3 / 5
Technical Support
3 / 5

33% of new reviewers recommend this product


Python Support for MCC DAQ Products
February 10, 2023
Documentation is SORELY lacking

Sample codes and documentation does not supply nearly enough information to get started

  • Job Title: Engineering
  • Industry:
  • Application:
Response from MCC
Measurement Computing,
February 16, 2023

The MCCULW page on GitHub https://github.com/mccdaq/mcculw provides installation instructions and code for a basic example. Additional examples can be downloaded from the GitHub page. The MCC UL Help file https://www.mccdaq.com/PDFs/Manuals/Mcculw_WebHelp/ULStart.htm covers the supported functions. For additional support, please see MCC’s sub forum at: https://forum.digilent.com/forum/39-measurement-computing-mcc/

  • From:
  • Company Size: 1-100
  • Software Used: Python

  • Ease of use
  • Value
  • Technical Support

Was this review helpful? Yes (0) / No (0)

Python™ Support for MCC DAQ Products
October 17, 2017
Python support on Windows is not Python support

Python support on Windows is a great start, but you're still leaving out many developers and applications! True python support should be more portable between platforms. What is your timeline for adding support on OS X and *NIX platforms?

  • Job Title: R&D Engineer
  • Industry:
  • Application:
Response from MCC
Measurement Computing,
October 25, 2017
Thank you for your feedback. Developing an API for interacting with Universal Library in Python is an ongoing project, and Windows OS support is the first offering available. Our team is working on expanding this support to other Operating Systems, including Linux and Mac OSX. If you have an immediate need for assistance, please reach out to our support team.”
Response from MCC
Measurement Computing,
October 11, 2018
Measurement Computing is happy to announce that we now have true Python support through our UL for Linux library. We now offer Open-source Linux support for the most popular MCC devices with interfaces for C and Python.
  • From: Somerville, MA
  • Company Size: 1-100
  • Software Used: Other

  • Ease of use
  • Value
  • Technical Support

Was this review helpful? Yes (6) / No (5)

Python™ Support for MCC DAQ Products
October 13, 2017
Finally, Python Support!

We are currently using several of the USB series DAQs (USB-204/USB-1208) in our production process, love the product. Just wanted to drop a quick line to say a big thank you to MCC for releasing the Python wrapper for the universal library. We are moving towards more automated testing (with Python), so the addition of Python support to your product has been a huge help. Many thanks for all the good work you guys are doing.

  • Job Title: Manufacturing Engineer
  • Industry: Lasers
  • Application: Manufacturing test/verification
  • From:
  • Company Size: 1-100
  • Software Used: Other

  • Ease of use
  • Value
  • Technical Support
Yes, I recommend this product!

Was this review helpful? Yes (8) / No (2)




Hi, Is the API for the linux and windows version identically in python for running the same code on boh windows and RPI?

  • Job Title: Engineer
  • Industry: Train
  • Application: Train measurement
16 months ago
Rapzak Denmark


Answers

Hello - The API for the Linux and Windows Python support is platform dependent so sharing common code between the two libraries is not possible.

16 months ago
Measurement Computing

Was this answer helpful? Yes (1) / No (0)

Hi, As there is no Python support for DT9837A in Windows, what would you suggest to develop our own Python codes for Windows from scratch?

  • Job Title: Manager
  • Industry: Structural health monitoring
  • Application: Vibration monitoring
24 months ago
insigma İstanbul


Answers

It is relatively easy to use the .net openlayers dll together with the pythonet package.

18 months ago
Daniel

Was this answer helpful? Yes (0) / No (0)

Creating your own Python wrapper to the Open Layers for Windows DLL calls would be very complex, and we cannot advise you on that. You could switch from Windows to Linux, since the DT9837A model is supported with Python via the UL for Linux. Though note that the UL for Linux API differs greatly from Open Layers, and so there is no way to leverage this Python API back into Windows. To stay with Windows, you could consider switching programming languages, from Python to C/C#/VB.

24 months ago

Was this answer helpful? Yes (0) / No (0)

Does this support using analog input trigger (CH1-CH4) with USB-1604HS-2AO?

  • Job Title: CTO
  • Industry:
  • Application:
24 months ago
YuvalInbar Israel


Answers

Yes, Python supports analog input triggering when using the USB-1604HS-2AO.

24 months ago
Measurement Computing

Was this answer helpful? Yes (0) / No (0)

Hello, I recently purchased a DT9837A card and the program named "DaqDevDiscovery01" can't find my card. When I check the device, there are no drivers installed for it. Even the Instacal software can't find the card. No way to find the right driver on your site.

  • Job Title: R&D
  • Industry:
  • Application:
29 months ago
Arthur B France


Answers

The only Python support offered for the DT9837A/B/C models is under Linux. The Windows API software is called Open Layers, and it can be found on the Data Translation section of our downloads page. Though again, there is no Python support for Open Layers and none is planned.

29 months ago
Measurement Computing

Was this answer helpful? Yes (0) / No (0)

Is InstaCal required to detect connected modules, or Device Discovery work without Instacal?

  • Job Title: Electrical EIT
  • Industry:
  • Application:
37 months ago
Paul


Answers

The device discovery functions can be used with Measurement Computing USB, Bluetooth, and Ethernet devices. Other board types such as PCI, ISA, CIO hardware don’t support device discovery functions, and must be installed and configured with InstaCal. When running Python examples with board types that don’t support device discovery functions, set the use_device_detection variable in the example program to False.

31 months ago
Measurement Computing

Was this answer helpful? Yes (2) / No (0)

Is there a latency spec (or a rough ballpark of what to expect) for setting analog outputs on a USB-3101FS via Python? By thaThanks in advance!

  • Job Title: Engineering program manager
  • Industry:
  • Application: Haptics research
41 months ago
miguelp Mountain View, CA


Answers

For a single value write to a single AO channel on a USB-3101FS, the overhead to access the USB/hardware is going be the dominant factor. Ballpark latency is 0.5 to 1 mS.

41 months ago
Measurement Computing

Was this answer helpful? Yes (1) / No (0)

Does this python library support USB 5203/5201? I have these daq cards and am getting an error.

  • Job Title: engineer
  • Industry: hvac
  • Application:
44 months ago
karimi tyler, texas


Answers

Yes the USB-5200 series is listed as supported with Python on Windows. The USB-5200 models are primarily stand-alone logger. You must first manually configure a logging session in InstaCal (set sensor type, which channels to log, sample rate, etc). The logger cannot log to its memory card when connected to the PC. You disconnect the logger from the PC for all logging to the memory card. Normally folks then use InstaCal (or perhaps TracerDAQ), to quickly/manually convert the binary data files to text/CSV files for further analysis in Excel. There are UL datalogger calls that can be made to convert a data file, though these historically have not been popular. If a USB-5200 model is left connected to the PC 100% of the time, it does not behave like a stand-alone logger, but instead behaves like a USB-TC/TEMP, and data can be samples live via the TIn function. Again no data gets logged to the memory card when connected to the PC, so if you will use the logger always connected to the PC, then just call TIn (no need to call the Datalogger functions, which again, don’t setup or perform the data logging, they just extract data from a binary file).

44 months ago
Measurement Computing

Was this answer helpful? Yes (2) / No (0)

  • Job Title: Sound Engineer
  • Industry:
  • Application:
48 months ago
Alex


Answers

It was decided to not include event support for that release. Today we have posted an unofficial example on our knowledgebase, that you can try: http://kb.mccdaq.com/KnowledgebaseArticle50769.aspx

48 months ago
Measurement Computing

Was this answer helpful? Yes (1) / No (0)

Hi, I'm trying to run the example codes using a USB-1608FS-PLUS but I don't know which is the PID number for this daq, so I get a 'Could not find a supported device.' message.

  • Job Title: Student
  • Industry:
  • Application:
59 months ago
YM


Answers

If by PID you mean the hardware model’s “Product ID” that can be found using Window’s Device Manager: Locate the USB-1608FS-PLUS under DAS components. But none of our Python examples specifically ask for a PID/device ID. For our Console examples, you do not have to first run our InstaCal utility. You need only have the device attached to USB port of the PC, and then try running one of these examples: a_in.py, a_in_foreground.py, v_in.py If you are running one of our GUI examples, you must first run InstaCal to have the hardware added to its board list. Then try running one of these examples: ULAI01.PY, ULAI03.py, VIn01.py.

59 months ago
Measurement Computing

Was this answer helpful? Yes (0) / No (0)

I have installed Instacal and using universal Library for help, I am not able to communicate with this module. All I have to do is to make FIRSTPORTA to static High/Low. Do you have any code which works for USB-DIO24?

  • Job Title: POST SILICON VALIDATION ENGINEER
  • Industry: Engineering
  • Application: Trimming algorithm for Operational amplifiers
64 months ago
Sai Bangalore, India


Answers

from mcculw import ul from mcculw.enums import ULRange from mcculw.ul import ULError # d_config_port(board_num, port_type, direction) # board_num -> can be found in InstaCal, port_type -> FirstPortA/FirstPortB/FirstPortCL/FirstPortCH =10/11/12/13, direction -> In/Out = 2/1 ul.d_config_port(0,10,1) ul.d_config_port(0,11,1) ul.d_config_port(0,12,1) ul.d_config_port(0,13,1) # d_out(board_num, port_type, data_value) # Data value to be written in decimal[0-255] ul.d_out(0,10,15) # FIRST FOUR BITS ARE TURN ON IN FirstPortA[MAX 8 BITS] ul.d_out(0,11,15) # FIRST FOUR BITS ARE TURN ON IN FirstPortB[MAX 8 BITS] ul.d_out(0,12,15) # FirstPortCL IS CONTROLLED USING NIBBLES[MAX 4 BITS] ul.d_out(0,13,15) # FirstPortCH IS CONTROLLED USING NIBBLES[MAX 4 BITS] plesae refer universal library for help https://www.mccdaq.com/PDFs/Manuals/Mcculw_WebHelp/ULStart.htm

64 months ago
Sai Varun

Was this answer helpful? Yes (0) / No (0)

Hello Sai - Our Python support, including examples programs, are available at: https://github.com/mccdaq. Try running the console example program named: digital_out.py

64 months ago
Measurement Computing

Was this answer helpful? Yes (1) / No (0)

I'm looking to use your Linux driver and am wondering if the python support works with it

  • Job Title: Engineer
  • Industry: Water Treatment
  • Application: pump monitoring
65 months ago
JR Boston, MA


Answers

MCC now has Linux support for the USB-DIO24 series, with our recent release of UL for Linux ver 1.1.0. The UL for Linux includes both Python and C/C++ support for MCC’s most popular USB devices.

48 months ago
Measurement Computing

Was this answer helpful? Yes (1) / No (1)

Universal Library Help     


Supported Products        

1 Year Warranty

1 Year Warranty

All products are backed with a one year warranty. Buy with confidence.

30 Day Money Back Guarantee

30-Day
Guarantee

If you aren’t happy, simply return the product for a full refund (U.S. customers only).

Live Help

Live Help

Having trouble deciding which product is right for your application? Chat with one of our sales engineers.