# LabJack

Stream and set LabJack T-series I/O

- Category: Data acquisition
- Capabilities: Streams, Assets, Commands, Operations, Entities
- Runs on: Linux x64, Linux ARM64, macOS Apple silicon, macOS Intel, Windows x64

Read analog inputs and set analog and digital outputs on LabJack T4, T7 and
T8 DAQs, over USB, Ethernet or WiFi.

## What you get

- **Live inputs** — the input channels you list, such as `AIN0, AIN1`.
- **Outputs** — DAC voltages (0–5 V) and digital lines, set from Trellis via
  `ch.write(path, value)`. Each write is read back and recorded.
- **One device per input**, named by its **Device name**. Channels read
  `/labjack/lj1/…`.

## Setup

1. Install the LabJack **LJM** library from labjack.com and connect the
   device. Phloem detects a T4, T7 or T8 over USB and offers a draft with its
   serial and model filled in. The steps below are the manual path.
2. In **Inputs**, add **LabJack** and fill in:
   - **Device name** — a short label, e.g. `lj1`
   - **Identifier** — `ANY`, a serial number, or an IP address
   - **Input channels** — e.g. `AIN0,AIN1`
   - **Poll rate** — e.g. `10`
3. Press **Test connection**. It shows the model, serial and one live reading.
   Without the LJM library, it fails and names the library it looked for.
4. Inputs appear on **Live**. Outputs are available in **Trellis**.
5. In the **Channels** table, give each channel a name and unit, such as
   `AIN0` → `bridge excitation`, `V`.

## Supports

- LabJack T4 / T7 / T8 via the LJM library (USB, Ethernet, WiFi)

## Connection fields

| Field | Type | Required | Notes |
|---|---|---|---|
| Device name | Text | Yes |  |
| Identifier (serial, IP, or ANY) | Text | No |  |
| Device type | Text | No |  |
| Input channels | Text | No |  |
| Poll rate (Hz) | Number | No |  |
| Channel scaling | Text | No |  |
