AFL.automation.loading.LabJackGPIO#

Classes

LabJackGPIO(channels[, pull_dir, ...])

class AFL.automation.loading.LabJackGPIO.LabJackGPIO(channels, pull_dir='UP', devicetype='ANY', connection='ANY', deviceident='ANY', scan_rate=5, shared_device=None, intermittent_device_handle=False)[source]#
__init__(channels, pull_dir='UP', devicetype='ANY', connection='ANY', deviceident='ANY', scan_rate=5, shared_device=None, intermittent_device_handle=False)[source]#

Initializes LabJack digital input monitoring.

Params: channels (dict): Mapping of pin id to name, e.g. {0: ‘arm_up’, 1: ‘arm_down’} pull_dir (str or dict, default ‘UP’): ‘UP’ or ‘DOWN’ pull direction for all pins, or a dict per pin. devicetype (str, default “ANY”): LabJack device type (“T4”, “T7”, etc.). connection (str, default “ANY”): “USB”, “TCP”, “ETHERNET”, or “WIFI”. deviceident (str, default “ANY”): Serial number, IP, device name, or “ANY”. scan_rate (int, default 100): Frequency in Hz to poll pin states. shared_device (LabJack class, optional): Shared device handle to use. intermittent_device_handle (bool, default False): If True, closes the device after each operation.

read(name)[source]#

Returns the last known state of a pin by its logical name.

stop()[source]#

Stops the monitoring loop and closes the device if needed.