Skip to main content

MCC Universal Library Python API for Windows

Project description

Info

Contains a Python API for interacting with Measurement Computing’s Universal Library. See GitHub for the latest source.

Author

Measurement Computing

About

The mcculw package contains an API (Application Programming Interface) for interacting with the I/O Library for Measurement Computing Data Acquisition products, Universal Library. This package was created and is supported by MCC. The package is implemented in Python as a wrapper around the Universal Library C API using the ctypes Python Library.

mcculw is supported for Universal Library 6.55 and later. Some functions in the mcculw package may be unavailable with earlier versions of Universal Library. Visit http://www.mccdaq.com/Software-Downloads.aspx to upgrade your version of UL.

mcculw supports only the Windows operating system.

mcculw supports CPython 2.7 and 3.4+.

Installation

Running mcculw requires InstaCal. Visit http://www.mccdaq.com/Software-Downloads.aspx to download the latest version of InstaCal.

mcculw can be installed with pip:

$ python pip install mcculw

Examples

Download the examples from the mcculw GitHub examples.zip.

Unzip the examples to a known location, such as:

C:\Users\Public\Documents\Measurement Computing\DAQ\Python

Refer to the Universal Library Help for detailed instructions on how to import examples into the Eclipse IDE or Visual Studio.

Usage

The following is a basic example of using the Universal Library to perform analog input. Further examples may be found on GitHub.

from mcculw import ul
from mcculw.enums import ULRange
from mcculw.ul import ULError

board_num = 0
channel = 0
ai_range = ULRange.BIP5VOLTS

try:
    # Get a value from the device
    value = ul.a_in(board_num, channel, ai_range)
    # Convert the raw value to engineering units
    eng_units_value = ul.to_eng_units(board_num, ai_range, value)

    # Display the raw value
    print("Raw Value: " + str(value))
    # Display the engineering value
    print("Engineering Value: " + '{:.3f}'.format(eng_units_value))
except ULError as e:
    # Display the error
    print("A UL error occurred. Code: " + str(e.errorcode)
          + " Message: " + e.message)

Support/Feedback

The mcculw package is supported by MCC. For support for mcculw, contact technical support through mccdaq.com/Support.aspx. Please include version information for Python, Universal Library and the mcculw packages used as well as detailed steps on how to reproduce the problem in your request.

Bugs/Feature Requests

To report a bug or submit a feature request, please use the mcculw GitHub issues page.

Documentation

Documentation is available in the Universal Library Help.

License

mcculw is licensed under an MIT-style license. Other incorporated projects may be licensed under different licenses. All licenses allow for non-commercial and commercial use.

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

mcculw-0.9.0.tar.gz (76.6 kB view details)

Uploaded Source

Built Distribution

mcculw-0.9.0-py2-none-any.whl (79.0 kB view details)

Uploaded Python 2

File details

Details for the file mcculw-0.9.0.tar.gz.

File metadata

  • Download URL: mcculw-0.9.0.tar.gz
  • Upload date:
  • Size: 76.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mcculw-0.9.0.tar.gz
Algorithm Hash digest
SHA256 292c8fdec63e53ce54a4f70bf8823788dc653f28b2d7c91bc2830911269bf8f4
MD5 c856f9e0a3fea167cdb99e6758f56680
BLAKE2b-256 e3a90c13125e2cccbcf42198c0bd70397650433568637d56a1b0aa61d52c9a57

See more details on using hashes here.

File details

Details for the file mcculw-0.9.0-py2-none-any.whl.

File metadata

File hashes

Hashes for mcculw-0.9.0-py2-none-any.whl
Algorithm Hash digest
SHA256 3a5a9a11c4134a1cb6eca28a3e6537861e222f0e61271383b2c3f3ac7bd28fb2
MD5 cb33075dfb3dd7ea0ee96e585b8918c7
BLAKE2b-256 eed48f0c0597004e04c06dbbc064431dc4ec0e7f836bd321692abf693dff7071

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page