labjack#
Import: apstools.devices.labjack
LabJack Data Acquisition (DAQ)#
|
A labjack T-series data acquisition unit (DAQ). |
Ophyd definitions for Labjack T-series data acquisition devices.
Supported devices, all inherit from LabJackBase:
T4
T7
T7Pro
T8
These devices are based on EPICS LabJack module R3.0. The EPICS IOC database changed significantly from R2 to R3 when the module was rewritten to use the LJM library.
See also
There are definitions for the entire LabJack device, as well as the various inputs/outputs available on the LabJack T-series. Individual inputs can be used as part of other devices. Assuming analog input 5 is connected to a gas flow meter:
from ophyd import Component as Cpt
from apstools.devices import labjack
class MyBeamline(Device):
...
gas_flow = Cpt(labjack.AnalogInput, "LabJackT7_1:Ai5")
Module Contents#
- class apstools.devices.labjack.AnalogInput(prefix='', *, name, kind=None, read_attrs=None, configuration_attrs=None, parent=None, child_name_separator='_', connection_timeout=DEFAULT_CONNECTION_TIMEOUT, **kwargs)[source]#
Import:
apstools.devices.labjack.AnalogInputBases:
InputAn analog input on a labjack device.
It is based on the synApps input record, but with LabJack specific signals added.
The
.trigger()method will retrieve a fresh value using the .PROC field, though based on how EPICS support works, this is likely just the most recently polled value from the device. This can be useful if the .SCAN field is set to passive.- property base_prefix#
- property ch_num#
- differential#
- enable#
- high#
- low#
- mode#
- range#
- resolution#
- temperature_units#
- class apstools.devices.labjack.AnalogOutput(prefix='', *, name, kind=None, read_attrs=None, configuration_attrs=None, parent=None, child_name_separator='_', connection_timeout=DEFAULT_CONNECTION_TIMEOUT, **kwargs)[source]#
Import:
apstools.devices.labjack.AnalogOutputBases:
OutputAn analog output on a labjack device.
- class apstools.devices.labjack.DigitalIO(*args, ch_num, **kwargs)[source]#
Import:
apstools.devices.labjack.DigitalIOBases:
ophyd.DeviceA digital input/output channel on the labjack.
Because of the how the records are structured in EPICS, the prefix must not include the “Bi{N}” portion of the prefix. Instead, the prefix should be prefix for the whole labjack (e.g.
LabJackT7_1:), and the channel number should be provided using the ch_num property. So for the digital I/O with its input available at PVLabJackT7_1:Bi3, use:dio3 = DigitalIO("LabJackT7_1:", name="dio3", ch_num=3)
This will create signals for the input (
Bi3), output (Bo3), and direction (Bd3) records.- ch_num: int#
- direction#
- input#
- output#
- class apstools.devices.labjack.LabJackBase(prefix='', *, name, kind=None, read_attrs=None, configuration_attrs=None, parent=None, child_name_separator='_', connection_timeout=DEFAULT_CONNECTION_TIMEOUT, **kwargs)[source]#
Import:
apstools.devices.labjack.LabJackBaseBases:
ophyd.DeviceA labjack T-series data acquisition unit (DAQ).
To use the individual components separately, consider using the corresponding devices in the list below.
This device contains signals for the following:
device information (e.g. firmware version ,etc)
analog outputs (
AnalogInput)analog inputs* (
AnalogOutput)digital input/output* (
DigitalIO)waveform digitizer* (
WaveformDigitizer)waveform generator (
WaveformGenerator)
The number of inputs and digital outputs depends on the specific LabJack T-series device being used. Therefore, the base device
LabJackBasedoes not implement these I/O signals. Instead, consider using one of the subclasses, likeLabJackT4.The
.trigger()method does not do much. To retrieve fresh values for analog inputs where .SCAN is passive, you will need to trigger the individual inputs themselves.The waveform generator and waveform digitizer are included for convenience. Reading all the analog/digital inputs and outputs can be done by calling the
.read()method. However, it is unlikely that the goal is also to trigger the digitizer and generator during this read. For this reason, the digitizer and generator have kind=”omitted”. To trigger the digitizer or generator, they can be used as separate devices:lj = LabJackT4(...) # Read a waveform from the digitizer lj.waveform_digitizer.trigger().wait() lj.waveform_digitizer.read() # Same thing for the waveform generator lj.waveform_generator.trigger().wait()
- analog_in_resolution_all#
- analog_in_sampling_rate#
- analog_in_settling_time_all#
- analog_outputs#
- device_reset#
- device_temperature#
- driver_version#
- firmware_version#
- last_error_message#
- ljm_version#
- model_name#
- poll_sleep_ms#
- poll_time_ms#
- serial_number#
- waveform_generator#
- class apstools.devices.labjack.LabJackT4(prefix='', *, name, kind=None, read_attrs=None, configuration_attrs=None, parent=None, child_name_separator='_', connection_timeout=DEFAULT_CONNECTION_TIMEOUT, **kwargs)[source]#
Import:
apstools.devices.labjack.LabJackT4Bases:
LabJackBaseA labjack T-series data acquisition unit (DAQ).
To use the individual components separately, consider using the corresponding devices in the list below.
This device contains signals for the following:
device information (e.g. firmware version ,etc)
analog outputs (
AnalogInput)analog inputs* (
AnalogOutput)digital input/output* (
DigitalIO)waveform digitizer* (
WaveformDigitizer)waveform generator (
WaveformGenerator)
The number of inputs and digital outputs depends on the specific LabJack T-series device being used. Therefore, the base device
LabJackBasedoes not implement these I/O signals. Instead, consider using one of the subclasses, likeLabJackT4.The
.trigger()method does not do much. To retrieve fresh values for analog inputs where .SCAN is passive, you will need to trigger the individual inputs themselves.The waveform generator and waveform digitizer are included for convenience. Reading all the analog/digital inputs and outputs can be done by calling the
.read()method. However, it is unlikely that the goal is also to trigger the digitizer and generator during this read. For this reason, the digitizer and generator have kind=”omitted”. To trigger the digitizer or generator, they can be used as separate devices:lj = LabJackT4(...) # Read a waveform from the digitizer lj.waveform_digitizer.trigger().wait() lj.waveform_digitizer.read() # Same thing for the waveform generator lj.waveform_generator.trigger().wait()
- class WaveformDigitizer(prefix='', *, name, kind=None, read_attrs=None, configuration_attrs=None, parent=None, child_name_separator='_', connection_timeout=DEFAULT_CONNECTION_TIMEOUT, **kwargs)[source]#
Import:
apstools.devices.labjack.LabJackT4.WaveformDigitizerBases:
WaveformDigitizerA feature of the Labjack devices that allows waveform capture.
By itself, this device does not include any actual data. It should be sub-classed for the individual T-series devices to use
make_digitizer_waveforms()to produce waveform signals based on the number of inputs, using the ophyd DynamicDeviceComponent.class T7Digitizer(WaveformDigitizer): waveforms = DCpt(make_digitizer_waveforms(14), kind="normal")
- waveforms#
- analog_inputs#
- digital_ios#
- waveform_digitizer#
- class apstools.devices.labjack.LabJackT7(prefix='', *, name, kind=None, read_attrs=None, configuration_attrs=None, parent=None, child_name_separator='_', connection_timeout=DEFAULT_CONNECTION_TIMEOUT, **kwargs)[source]#
Import:
apstools.devices.labjack.LabJackT7Bases:
LabJackBaseA labjack T-series data acquisition unit (DAQ).
To use the individual components separately, consider using the corresponding devices in the list below.
This device contains signals for the following:
device information (e.g. firmware version ,etc)
analog outputs (
AnalogInput)analog inputs* (
AnalogOutput)digital input/output* (
DigitalIO)waveform digitizer* (
WaveformDigitizer)waveform generator (
WaveformGenerator)
The number of inputs and digital outputs depends on the specific LabJack T-series device being used. Therefore, the base device
LabJackBasedoes not implement these I/O signals. Instead, consider using one of the subclasses, likeLabJackT4.The
.trigger()method does not do much. To retrieve fresh values for analog inputs where .SCAN is passive, you will need to trigger the individual inputs themselves.The waveform generator and waveform digitizer are included for convenience. Reading all the analog/digital inputs and outputs can be done by calling the
.read()method. However, it is unlikely that the goal is also to trigger the digitizer and generator during this read. For this reason, the digitizer and generator have kind=”omitted”. To trigger the digitizer or generator, they can be used as separate devices:lj = LabJackT4(...) # Read a waveform from the digitizer lj.waveform_digitizer.trigger().wait() lj.waveform_digitizer.read() # Same thing for the waveform generator lj.waveform_generator.trigger().wait()
- class WaveformDigitizer(prefix='', *, name, kind=None, read_attrs=None, configuration_attrs=None, parent=None, child_name_separator='_', connection_timeout=DEFAULT_CONNECTION_TIMEOUT, **kwargs)[source]#
Import:
apstools.devices.labjack.LabJackT7.WaveformDigitizerBases:
WaveformDigitizerA feature of the Labjack devices that allows waveform capture.
By itself, this device does not include any actual data. It should be sub-classed for the individual T-series devices to use
make_digitizer_waveforms()to produce waveform signals based on the number of inputs, using the ophyd DynamicDeviceComponent.class T7Digitizer(WaveformDigitizer): waveforms = DCpt(make_digitizer_waveforms(14), kind="normal")
- waveforms#
- analog_inputs#
- digital_ios#
- waveform_digitizer#
- class apstools.devices.labjack.LabJackT7Pro(prefix='', *, name, kind=None, read_attrs=None, configuration_attrs=None, parent=None, child_name_separator='_', connection_timeout=DEFAULT_CONNECTION_TIMEOUT, **kwargs)[source]#
Import:
apstools.devices.labjack.LabJackT7ProBases:
LabJackBaseA labjack T-series data acquisition unit (DAQ).
To use the individual components separately, consider using the corresponding devices in the list below.
This device contains signals for the following:
device information (e.g. firmware version ,etc)
analog outputs (
AnalogInput)analog inputs* (
AnalogOutput)digital input/output* (
DigitalIO)waveform digitizer* (
WaveformDigitizer)waveform generator (
WaveformGenerator)
The number of inputs and digital outputs depends on the specific LabJack T-series device being used. Therefore, the base device
LabJackBasedoes not implement these I/O signals. Instead, consider using one of the subclasses, likeLabJackT4.The
.trigger()method does not do much. To retrieve fresh values for analog inputs where .SCAN is passive, you will need to trigger the individual inputs themselves.The waveform generator and waveform digitizer are included for convenience. Reading all the analog/digital inputs and outputs can be done by calling the
.read()method. However, it is unlikely that the goal is also to trigger the digitizer and generator during this read. For this reason, the digitizer and generator have kind=”omitted”. To trigger the digitizer or generator, they can be used as separate devices:lj = LabJackT4(...) # Read a waveform from the digitizer lj.waveform_digitizer.trigger().wait() lj.waveform_digitizer.read() # Same thing for the waveform generator lj.waveform_generator.trigger().wait()
- class WaveformDigitizer(prefix='', *, name, kind=None, read_attrs=None, configuration_attrs=None, parent=None, child_name_separator='_', connection_timeout=DEFAULT_CONNECTION_TIMEOUT, **kwargs)[source]#
Import:
apstools.devices.labjack.LabJackT7Pro.WaveformDigitizerBases:
WaveformDigitizerA feature of the Labjack devices that allows waveform capture.
By itself, this device does not include any actual data. It should be sub-classed for the individual T-series devices to use
make_digitizer_waveforms()to produce waveform signals based on the number of inputs, using the ophyd DynamicDeviceComponent.class T7Digitizer(WaveformDigitizer): waveforms = DCpt(make_digitizer_waveforms(14), kind="normal")
- waveforms#
- analog_inputs#
- digital_ios#
- waveform_digitizer#
- class apstools.devices.labjack.LabJackT8(prefix='', *, name, kind=None, read_attrs=None, configuration_attrs=None, parent=None, child_name_separator='_', connection_timeout=DEFAULT_CONNECTION_TIMEOUT, **kwargs)[source]#
Import:
apstools.devices.labjack.LabJackT8Bases:
LabJackBaseA labjack T-series data acquisition unit (DAQ).
To use the individual components separately, consider using the corresponding devices in the list below.
This device contains signals for the following:
device information (e.g. firmware version ,etc)
analog outputs (
AnalogInput)analog inputs* (
AnalogOutput)digital input/output* (
DigitalIO)waveform digitizer* (
WaveformDigitizer)waveform generator (
WaveformGenerator)
The number of inputs and digital outputs depends on the specific LabJack T-series device being used. Therefore, the base device
LabJackBasedoes not implement these I/O signals. Instead, consider using one of the subclasses, likeLabJackT4.The
.trigger()method does not do much. To retrieve fresh values for analog inputs where .SCAN is passive, you will need to trigger the individual inputs themselves.The waveform generator and waveform digitizer are included for convenience. Reading all the analog/digital inputs and outputs can be done by calling the
.read()method. However, it is unlikely that the goal is also to trigger the digitizer and generator during this read. For this reason, the digitizer and generator have kind=”omitted”. To trigger the digitizer or generator, they can be used as separate devices:lj = LabJackT4(...) # Read a waveform from the digitizer lj.waveform_digitizer.trigger().wait() lj.waveform_digitizer.read() # Same thing for the waveform generator lj.waveform_generator.trigger().wait()
- class WaveformDigitizer(prefix='', *, name, kind=None, read_attrs=None, configuration_attrs=None, parent=None, child_name_separator='_', connection_timeout=DEFAULT_CONNECTION_TIMEOUT, **kwargs)[source]#
Import:
apstools.devices.labjack.LabJackT8.WaveformDigitizerBases:
WaveformDigitizerA feature of the Labjack devices that allows waveform capture.
By itself, this device does not include any actual data. It should be sub-classed for the individual T-series devices to use
make_digitizer_waveforms()to produce waveform signals based on the number of inputs, using the ophyd DynamicDeviceComponent.class T7Digitizer(WaveformDigitizer): waveforms = DCpt(make_digitizer_waveforms(14), kind="normal")
- waveforms#
- analog_inputs#
- digital_ios#
- waveform_digitizer#
- class apstools.devices.labjack.WaveformDigitizer(prefix='', *, name, kind=None, read_attrs=None, configuration_attrs=None, parent=None, child_name_separator='_', connection_timeout=DEFAULT_CONNECTION_TIMEOUT, **kwargs)[source]#
Import:
apstools.devices.labjack.WaveformDigitizerBases:
ophyd.DeviceA feature of the Labjack devices that allows waveform capture.
By itself, this device does not include any actual data. It should be sub-classed for the individual T-series devices to use
make_digitizer_waveforms()to produce waveform signals based on the number of inputs, using the ophyd DynamicDeviceComponent.class T7Digitizer(WaveformDigitizer): waveforms = DCpt(make_digitizer_waveforms(14), kind="normal")
- auto_restart#
- current_point#
- dwell#
- dwell_actual#
- ext_clock#
- ext_trigger#
- first_chan#
- num_chans#
- num_points#
- read_waveform#
- resolution#
- run#
- settling_time#
- timebase_waveform#
- total_time#
- class apstools.devices.labjack.WaveformGenerator(prefix='', *, name, kind=None, read_attrs=None, configuration_attrs=None, parent=None, child_name_separator='_', connection_timeout=DEFAULT_CONNECTION_TIMEOUT, **kwargs)[source]#
Import:
apstools.devices.labjack.WaveformGeneratorBases:
ophyd.DeviceA feature of the Labjack devices that generates output waveforms.
- amplitude_0#
- amplitude_1#
- continuous#
- current_point#
- dwell#
- dwell_actual#
- enable_0#
- enable_1#
- external_clock#
- external_trigger#
- frequency#
- internal_dwell#
- internal_frequency#
- internal_num_points#
- internal_time_waveform#
- internal_waveform_0#
- internal_waveform_1#
- num_points#
- offset_0#
- offset_1#
- pulse_width_0#
- pulse_width_1#
- run#
- total_time#
- type_0#
- type_1#
- user_dwell#
- user_frequency#
- user_num_points#
- user_time_waveform#
- user_waveform_0#
- user_waveform_1#
- apstools.devices.labjack.make_digitizer_waveforms(num_ais: int)[source]#
Import:
apstools.devices.labjack.make_digitizer_waveformsCreate a dictionary with volt waveforms for the digitizer.
For use with an ophyd DynamicDeviceComponent.
Each analog input on the labjack could be included here, and probably should be unless there is a specific reason not to.
Parameters#
- num_ais
How many analog inputs to include for this Labjack device.