Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
The official Python modules and classes for interacting with the LabJack U3, U6, UE9 and U12
Python

README

LabJackPython: Cross-platform (Windows, Linux, Mac OS X) Python modules and
examples for the LabJack U3, U6, UE9 and U12.
05/26/2015
support@labjack.com

Python 2.5 or higher is required to use LabJackPython. Python 3.x is not
supported.

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

    http://labjack.com/support/modbus

To upgrade firmware look at this page:

    http://labjack.com/support/firmware

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

    http://labjack.com/support/firmware/ue9

To install LabJackPython, run the following command in a terminal:

    $ sudo python setup.py install

(Leave off the `sudo' on Windows.)
    
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()

From there, check the Examples/ directory, especially the workingWithModbus.py
file to get started.


LICENSE

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

   Copyright (c) 2011 LabJack Corporation <support@labjack.com>

   Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software and associated documentation files (the "Software"), to deal
   in the Software without restriction, including without limitation the rights
   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   copies of the Software, and to permit persons to whom the Software is
   furnished to do so, subject to the following conditions:

   The above copyright notice and this permission notice shall be included in
   all copies or substantial portions of the Software.

   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   THE SOFTWARE.
Something went wrong with that request. Please try again.