lantz.drivers.labjack

company:LabJack
description:LabJacks are USB/Ethernet based measurement and automation devices which provide analog inputs/outputs, digital inputs/outputs, and more.
website:http://www.labjack.com/

copyright:2015 by Lantz Authors, see AUTHORS for more details.
license:BSD, see LICENSE for more details.
class lantz.drivers.labjack.U12(board_id)

Bases: lantz.driver.Driver

Driver for the Labjack U12 data acquisition device. http://labjack.com/support/u12/users-guide For details about the commands, refer to the users guide.

finalize()
initialize()
analog_dif_in
Keys:

[0, 1, 2, 3]

Differential channels can make use of the low noise precision PGA to provide gains up to 20. In differential mode, the voltage of each AI with respect to ground must be between +20 and -10 volts, but the range of voltage difference between the 2 AI is a function of gain (G) as follows: G=1 ±20 volts G=2 ±10 volts G=4 ±5 volts G=5 ±4 volts G=8 ±2.5 volts G=10 ±2 volts G=16 ±1.25 volts G=20 ±1 volt The reason the range is ±20 volts at G=1 is that, for example, AI0 could be +10 volts and AI1 could be -10 volts giving a difference of +20 volts, or AI0 could be -10 volts and AI1 could be +10 volts giving a difference of -20 volts. The PGA (programmable gain amplifier, available on differential channels only) amplifies the AI voltage before it is digitized by the A/D converter. The high level drivers then divide the reading by the gain and return the actual measured voltage.

Units:

volts

analog_dif_in_changed
analog_in
Keys:ANY
Units:volts
analog_in_changed
analog_out
Keys:

[0, 1]

Easy function. This is a simplified version of AOUpdate. Sets the voltage of both analog outputs. Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows). If either passed voltage is less than zero, the DLL uses the last set voltage. This provides a way to update 1 output without changing the other.

Units:

volts

analog_out_changed
digital_in_out
Keys:

[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]

Easy function. This is a simplified version of DigitalIO that reads the state of one digital input. Also configures the requested pin to input and leaves it that way. Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows). channel – Line to read. 0-3 for IO or 0-15 for D.

Values:

{False: 0, True: 1}

digital_in_out_changed
finalize_changed
initialize_changed