Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

The LabJack Python modules for the LabJack U3, U6, UE9 and U12.

Project description

sti-LabJackPython

Cross-platform (Windows, Linux, Mac OS X) Python modules and examples for the LabJack U3, U6, UE9 and U12.

2019-01-23

support@labjack.com

Requirements

LabJackPython requires Python 2.6, 2.7 or 3.x. For Python 3.x, most functionality has been tested but not all yet. Please report bugs to support@labjack.com or on GitHub:

https://github.com/labjack/LabJackPython

To use Modbus first check that your LabJack device meets the minimum required firmware version listed on this page:

https://labjack.com/support/software/api/modbus/ud-modbus

To upgrade firmware look at this page:

https://labjack.com/support/firmware

To use Modbus on a UE9 over Ethernet, install Comm firmware 1.50 or higher.

Install:

To install for a user

$ python -m pip install --user --upgrade sti-LabjackPython

To install systemwide (not recommended)

$ python -m pip install --upgrade sti-LabjackPython

If there are multiple versions Python installed, run the install command with the Python version you want to install to. For example, on Linux if both Python 2.7 and 3.5 are installed, you can install to Python 3.5 with:

$ python3.5 -m pip install sti-LabjackPython

Run

From there, interacting with your devices is easy.

For U3:

>>> import u3
>>> d = u3.U3()
>>> d.configU3()
{'BootloaderVersion': '0.27',
 'CIODirection': 0,
 ...,
}
>>> d.close()

For U6:

>>> import u6
>>> d = u6.U6()
>>> d.configU6()
{'BootloaderVersion': '6.15',
 'FirmwareVersion': '0.88',
 ...,
}
>>> d.close()

For UE9:

>>> import ue9
>>> d = ue9.UE9()
>>> d.commConfig()
{'IPAddress' : '192.168.1.209'
 ...,
}
>>> d.close()

For U12:

>>> import u12
>>> d = u12.U12()
>>> d.eAnalogIn(0)
{'overVoltage': 0,
 'idnum': 0,
 'voltage': 1.42578125
}
>>> d.close()

For examples, check the Examples/ directory. For additional information, go to the LabJackPython page on LabJack's website:

https://labjack.com/support/software/examples/ud/labjackpython

LICENSE

All LabJackPython library and example source code are licensed under MIT X11.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sti-LabJackPython, version 2.0.0.post1
Filename, size File type Python version Upload date Hashes
Filename, size sti_LabJackPython-2.0.0.post1-py2.py3-none-any.whl (113.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size sti-LabJackPython-2.0.0.post1.tar.gz (110.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page