# NI analog read task

> Read voltages, currents, temperatures, and other sensor signals from NI devices into channels.

An NI analog read task reads the analog inputs of NI devices into channels. Each channel has a type, such as voltage, current, thermocouple, or bridge, and NI-DAQmx converts the signal to the units of that type. For example, one task can record pressure transducers on an NI 9205 and thermocouples on an NI 9211 in the same chassis.

Before you start, you need [configured devices](https://docs.synnaxlabs.com/reference/hardware/ni/configure-device).

## Channels and timing

Each channel reads one port of one device. A task can use the modules of one chassis, and all of them must be on the same Driver. The task samples every channel on the device clock, at the **Sample rate**. See [timing](https://docs.synnaxlabs.com/reference/hardware/tasks#timing).

Only one running task can use the analog inputs of a module. A second task on the same module fails to start with an NI-DAQmx error that says the resource is reserved.

## Create an NI analog read task

[Enterprise](https://docs.synnaxlabs.com/reference/get-started/editions "Needs Synnax Enterprise")

**Console**

1. In the devices toolbar, right-click a device and select **Create analog read task**.
2. Set **Sample rate** and **Stream rate**.
3. Click **Add channel**. In **Source**, select the **Device** and the **Port**.
4. In **Signal**, select the **Channel type**, then set its fields. See the [channel reference](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#channel-reference).
5. Click (**Start**).

The Console creates the channels. For a device with the identifier `dev1`, port 0 gives `dev1_ai_0`, and the built-in temperature sensor gives `dev1_ai_temp`. Each device has an index channel, such as `dev1_ai_time`.

[](https://synnax.nyc3.cdn.digitaloceanspaces.com/docs/hardware/ni/analog-read-task-dark.mp4#t=0.001)

**Python**

Python does not create channels. Create them first.

```python
import synnax as sy
from synnax import ni

dev = client.devices.retrieve(key="<device key>")
time = client.channels.create(
    name="dev1_ai_time", is_index=True, data_type=sy.DataType.TIMESTAMP
)
pressure = client.channels.create(
    name="tank_pressure", index=time.key, data_type=sy.DataType.FLOAT32
)

task = ni.AnalogReadTask(
    name="Tank sensors",
    device=dev.key,
    sample_rate=1000,
    stream_rate=25,
    channels=[
        ni.AIVoltageChannel(
            port=0, min_val=-10, max_val=10, channel=pressure.key
        ),
    ],
)
client.tasks.configure(task)
task.start()
```

Python creates the task on the embedded Driver of the Core. For a device on another Driver, use the Console or TypeScript. If you open the task in the Console and click **Start**, the Console replaces your channels with its own.

**TypeScript**

TypeScript does not create channels. Create them first.

```typescript
import { ni } from "@synnaxlabs/client";

const dev = await client.devices.retrieve({ key: "<device key>" });
const time = await client.channels.create({
  name: "dev1_ai_time",
  isIndex: true,
  dataType: "timestamp",
});
const pressure = await client.channels.create({
  name: "tank_pressure",
  index: time.key,
  dataType: "float32",
});

const task = await client.tasks.create({
  name: "Tank sensors",
  rack: dev.rack,
  type: "ni_analog_read",
  config: ni.analogReadConfigZ.parse({
    sampleRate: 1000,
    streamRate: 25,
    channels: [
      {
        type: "ai_voltage",
        device: dev.key,
        port: 0,
        minVal: -10,
        maxVal: 10,
        channel: pressure.key,
      },
    ],
  }),
});
await task.start();
```

If you open the task in the Console and click **Start**, the Console replaces your channels with its own.

## Tare channels

Tare sets the current value of a channel to zero. The task must be running.

1. In the channel list, click **Tare** on a channel. To tare several channels, select them, right-click, and select **Tare**.
2. The values of those channels start from zero.

## Task options

| Console label | Python field           | Default | Notes                                                                                               |
| ------------- | ---------------------- | ------- | --------------------------------------------------------------------------------------------------- |
| Sample rate   | `sample_rate`          | 10 Hz   | Up to 1,000,000 Hz in the Console. Each device has a minimum.                                       |
| Stream rate   | `stream_rate`          | 5 Hz    | Up to 20,000 Hz. See [read tasks](https://docs.synnaxlabs.com/reference/hardware/tasks#read-tasks). |
| Data saving   | `data_saving_disabled` | On      | See [data saving](https://docs.synnaxlabs.com/reference/hardware/tasks#data-saving).                |
| Auto start    | `auto_start`           | Off     | Starts the task each time the Driver starts.                                                        |

## Channel reference

Every channel has a `channel`, the Synnax channel that records the value, a `device`, the key of the device (**Device**), and a `port` (**Port**). The built-in temperature sensor has no port. In Python, a channel with no `device` uses the `device` of the task.

Each table shows the Console label of a setting, with its Python field under it. The **Notes** column lists the values that code uses, such as `MetersPerSecondSquared`. The Console shows the same values as symbols, such as m/s². Every type except the temperature types also has **Custom scaling**.

**Electrical**

**Voltage**

#### [Voltage](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_voltage)

Python `AIVoltageChannel`TypeScript `ai_voltage`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1ga94c83a5df8579b4164e638018b7ee89f.html)

Reads a voltage.

| Setting                                  | Default       | Notes                                               |
| ---------------------------------------- | ------------- | --------------------------------------------------- |
| Range `min_val`, `max_val`               | `0` to `1`    | In volts.                                           |
| Terminal configuration `terminal_config` | `Cfg_Default` | `Cfg_Default`, `RSE`, `NRSE`, `Diff`, `PseudoDiff`. |

**Voltage RMS**

#### [Voltage RMS](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_voltage_rms)

Python `AIVoltageRMSChannel`TypeScript `ai_voltage_rms`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1gae3c40696c94f896a2c60784e3baf3905.html)

Reads the RMS value of a voltage.

| Setting                                  | Default       | Notes                                               |
| ---------------------------------------- | ------------- | --------------------------------------------------- |
| Range `min_val`, `max_val`               | `0` to `1`    | In volts.                                           |
| Terminal configuration `terminal_config` | `Cfg_Default` | `Cfg_Default`, `RSE`, `NRSE`, `Diff`, `PseudoDiff`. |

**Voltage with excitation**

#### [Voltage with excitation](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_voltage_with_excit)

Python `AIVoltageWithExcitChannel`TypeScript `ai_voltage_with_excit`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1ga12a57904c16ebc47c62a788f5435ca0a.html)

Reads a voltage from a sensor that needs voltage excitation. The value can be scaled by the excitation.

| Setting                                           | Default       | Notes                                        |
| ------------------------------------------------- | ------------- | -------------------------------------------- |
| Range `min_val`, `max_val`                        | `0` to `1`    | In volts.                                    |
| Terminal configuration `terminal_config`          | `Cfg_Default` |                                              |
| Bridge configuration `bridge_config`              | `FullBridge`  | `FullBridge`, `HalfBridge`, `QuarterBridge`. |
| Voltage excitation source `voltage_excit_source`  | `Internal`    | `Internal`, `External`, `None`.              |
| Voltage excitation value `voltage_excit_val`      | `0`           | In volts.                                    |
| Use excitation for scaling `scaled_by_excitation` | `false`       | Scale the reading by the excitation voltage. |

**Current**

#### [Current](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_current)

Python `AICurrentChannel`TypeScript `ai_current`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1gadc9361c4cad612aeae3abe022076f5eb.html)

Reads a current through a shunt resistor.

| Setting                                      | Default       | Notes                              |
| -------------------------------------------- | ------------- | ---------------------------------- |
| Range `min_val`, `max_val`                   | `0` to `1`    | In amps.                           |
| Terminal configuration `terminal_config`     | `Cfg_Default` |                                    |
| Shunt resistor location `shunt_resistor_loc` | `Default`     | `Default`, `Internal`, `External`. |
| Shunt resistance `ext_shunt_resistor_val`    | `1`           | In ohms.                           |

**Current RMS**

#### [Current RMS](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_current_rms)

Python `AICurrentRMSChannel`TypeScript `ai_current_rms`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1gaef068e8b2360f0164842a72fd44f5374.html)

Reads the RMS value of a current through a shunt resistor.

| Setting                                      | Default       | Notes                              |
| -------------------------------------------- | ------------- | ---------------------------------- |
| Range `min_val`, `max_val`                   | `0` to `1`    | In amps.                           |
| Terminal configuration `terminal_config`     | `Cfg_Default` |                                    |
| Shunt resistor location `shunt_resistor_loc` | `Default`     | `Default`, `Internal`, `External`. |
| Shunt resistance `ext_shunt_resistor_val`    | `1`           | In ohms.                           |

**Charge**

#### [Charge](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_charge)

Python `AIChargeChannel`TypeScript `ai_charge`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1ga4e2aeb0cb00398ba8f132c5407ea5d58.html)

Reads a raw charge.

| Setting                                  | Default       | Notes                       |
| ---------------------------------------- | ------------- | --------------------------- |
| Range `min_val`, `max_val`               | `0` to `1`    | In **Charge units**.        |
| Terminal configuration `terminal_config` | `Cfg_Default` |                             |
| Charge units `units`                     | `Coulombs`    | `Coulombs`, `PicoCoulombs`. |

**Resistance**

#### [Resistance](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_resistance)

Python `AIResistanceChannel`TypeScript `ai_resistance`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1gaa8454a1de839ded8669cce2b4b25cca4.html)

Reads a resistance, with current excitation.

| Setting                                          | Default    | Notes                           |
| ------------------------------------------------ | ---------- | ------------------------------- |
| Range `min_val`, `max_val`                       | `0` to `1` | In ohms.                        |
| Resistance configuration `resistance_config`     | `2Wire`    | `2Wire`, `3Wire`, `4Wire`.      |
| Current excitation source `current_excit_source` | `Internal` | `Internal`, `External`, `None`. |
| Current excitation value `current_excit_val`     | `0`        | In amps.                        |

**Frequency voltage**

#### [Frequency voltage](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_freq_voltage)

Python `AIFreqVoltageChannel`TypeScript `ai_freq_voltage`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1gacfae87d4bb8abd35f8794543302fca06.html)

Reads the frequency of a voltage signal. A cycle counts each time the signal crosses the threshold level.

| Setting                           | Default    | Notes                                      |
| --------------------------------- | ---------- | ------------------------------------------ |
| Range `min_val`, `max_val`        | `0` to `1` | In hertz.                                  |
| Threshold level `threshold_level` | `0`        | Voltage level at which a cycle is counted. |
| Hysteresis `hysteresis`           | `0`        | In volts.                                  |

**Temperature**

**Thermocouple**

#### [Thermocouple](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_thermocouple)

Python `AIThermocoupleChannel`TypeScript `ai_thermocouple`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1gab4d78206aa204316fecb740a123b38f7.html)

Reads temperature from a thermocouple, with cold-junction compensation (CJC).

| Setting                               | Default    | Notes                                                                                       |
| ------------------------------------- | ---------- | ------------------------------------------------------------------------------------------- |
| Range `min_val`, `max_val`            | `0` to `1` | In **Temperature units**.                                                                   |
| Temperature units `units`             | `DegC`     | `DegC`, `DegF`, `Kelvins`, `DegR`.                                                          |
| Thermocouple type `thermocouple_type` | `J`        | `J`, `K`, `N`, `R`, `S`, `T`, `B`, `E`.                                                     |
| CJC source `cjc`                      | `built_in` | **Built in** (`built_in`), **Constant value** (`const_val`), or **Channel** (`chan`).       |
| CJC value `cjc.val`                   |            | The CJC temperature, for **Constant value**.                                                |
| CJC port `cjc.port`                   |            | For **Channel**: the position, from 0, of the CJC channel in the task, not a physical port. |

**RTD**

#### [RTD](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_rtd)

Python `AIRTDChannel`TypeScript `ai_rtd`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1ga3111dddf4f6eef35801096d09db7d574.html)

Reads temperature from an RTD.

| Setting                                          | Default    | Notes                                                       |
| ------------------------------------------------ | ---------- | ----------------------------------------------------------- |
| Range `min_val`, `max_val`                       | `0` to `1` | In **Temperature units**.                                   |
| Temperature units `units`                        | `DegC`     | `DegC`, `DegF`, `Kelvins`, `DegR`.                          |
| RTD type `rtd_type`                              | `Pt3750`   | `Pt3750`, `Pt3851`, `Pt3911`, `Pt3916`, `Pt3920`, `Pt3928`. |
| R0 resistance `r0`                               | `0`        | At 0 °C, in ohms.                                           |
| Resistance configuration `resistance_config`     | `2Wire`    | `2Wire`, `3Wire`, `4Wire`.                                  |
| Current excitation source `current_excit_source` | `Internal` | `Internal`, `External`, `None`.                             |
| Current excitation value `current_excit_val`     | `0`        | In amps.                                                    |

**Thermistor current excitation**

#### [Thermistor current excitation](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_thermistor_iex)

Python `AIThermistorIexChannel`TypeScript `ai_thermistor_iex`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1gaf7dc57c48b676e22c788574fecb4f512.html)

Reads temperature from a thermistor with current excitation.

| Setting                                          | Default    | Notes                              |
| ------------------------------------------------ | ---------- | ---------------------------------- |
| Range `min_val`, `max_val`                       | `0` to `1` | In **Temperature units**.          |
| Temperature units `units`                        | `DegC`     | `DegC`, `DegF`, `Kelvins`, `DegR`. |
| Resistance configuration `resistance_config`     | `2Wire`    | `2Wire`, `3Wire`, `4Wire`.         |
| Current excitation source `current_excit_source` | `Internal` | `Internal`, `External`, `None`.    |
| Current excitation value `current_excit_val`     | `0`        | In amps.                           |
| Steinhart-Hart A `a`                             | `0`        |                                    |
| Steinhart-Hart B `b`                             | `0`        |                                    |
| Steinhart-Hart C `c`                             | `0`        |                                    |

**Thermistor voltage excitation**

#### [Thermistor voltage excitation](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_thermistor_vex)

Python `AIThermistorVexChannel`TypeScript `ai_thermistor_vex`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1ga79514ce1961338c419f0d6e1157e7b83.html)

Reads temperature from a thermistor with voltage excitation.

| Setting                                          | Default    | Notes                              |
| ------------------------------------------------ | ---------- | ---------------------------------- |
| Range `min_val`, `max_val`                       | `0` to `1` | In **Temperature units**.          |
| Temperature units `units`                        | `DegC`     | `DegC`, `DegF`, `Kelvins`, `DegR`. |
| Resistance configuration `resistance_config`     | `2Wire`    | `2Wire`, `3Wire`, `4Wire`.         |
| Voltage excitation source `voltage_excit_source` | `Internal` | `Internal`, `External`, `None`.    |
| Voltage excitation value `voltage_excit_val`     | `0`        | In volts.                          |
| Steinhart-Hart A `a`                             | `0`        |                                    |
| Steinhart-Hart B `b`                             | `0`        |                                    |
| Steinhart-Hart C `c`                             | `0`        |                                    |
| Reference resistor `r1`                          | `0`        | In ohms.                           |

**Temperature built-in sensor**

#### [Temperature built-in sensor](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_temp_builtin)

Python `AITempBuiltinChannel`TypeScript `ai_temp_builtin`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1gaaa6a97a78f05458c86bb1c1b86ed2781.html)

Reads the temperature of the built-in sensor of the device.

| Setting                   | Default | Notes                              |
| ------------------------- | ------- | ---------------------------------- |
| Temperature units `units` | `DegC`  | `DegC`, `DegF`, `Kelvins`, `DegR`. |

**Bridge**

**Bridge**

#### [Bridge](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_bridge)

Python `AIBridgeChannel`TypeScript `ai_bridge`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1gab4d2a28bcc4212e7787808315471db67.html)

Reads a bridge-based sensor as the ratio of its output voltage to the excitation voltage.

| Setting                                               | Default         | Notes                                        |
| ----------------------------------------------------- | --------------- | -------------------------------------------- |
| Range `min_val`, `max_val`                            | `0` to `1`      | In **Electrical units**.                     |
| Electrical units `units`                              | `mVoltsPerVolt` | `mVoltsPerVolt`, `VoltsPerVolt`.             |
| Bridge configuration `bridge_config`                  | `FullBridge`    | `FullBridge`, `HalfBridge`, `QuarterBridge`. |
| Voltage excitation source `voltage_excit_source`      | `Internal`      | `Internal`, `External`, `None`.              |
| Voltage excitation value `voltage_excit_val`          | `0`             | In volts.                                    |
| Nominal bridge resistance `nominal_bridge_resistance` | `1`             | In ohms.                                     |

**Strain gauge**

#### [Strain gauge](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_strain_gauge)

Python `AIStrainGaugeChannel`TypeScript `ai_strain_gauge`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1gab03c96b23cedb809011edc2df6fbef3e.html)

Reads strain from a strain gauge.

| Setting                                           | Default       | Notes                                                                                                               |
| ------------------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------- |
| Range `min_val`, `max_val`                        | `0` to `1`    | As strain, with no unit.                                                                                            |
| Strain configuration `strain_config`              | `FullBridgeI` | `FullBridgeI`, `FullBridgeII`, `FullBridgeIII`, `HalfBridgeI`, `HalfBridgeII`, `QuarterBridgeI`, `QuarterBridgeII`. |
| Voltage excitation source `voltage_excit_source`  | `Internal`    | `Internal`, `External`, `None`.                                                                                     |
| Voltage excitation value `voltage_excit_val`      | `0`           | In volts.                                                                                                           |
| Gage factor `gage_factor`                         | `0`           |                                                                                                                     |
| Initial bridge voltage `initial_bridge_voltage`   | `0`           |                                                                                                                     |
| Nominal gage resistance `nominal_gage_resistance` | `0`           | In ohms.                                                                                                            |
| Poisson’s ratio `poisson_ratio`                   | `0`           |                                                                                                                     |
| Lead wire resistance `lead_wire_resistance`       | `0`           | In ohms.                                                                                                            |

**Force**

**Force bridge polynomial**

#### [Force bridge polynomial](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_force_bridge_polynomial)

Python `AIForceBridgePolynomialChannel`TypeScript `ai_force_bridge_polynomial`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1ga407b87343cc271196c53089ff2f9b383.html)

Reads force from a bridge, such as a load cell. Polynomial coefficients convert the electrical value to force.

| Setting                                               | Default         | Notes                                                       |
| ----------------------------------------------------- | --------------- | ----------------------------------------------------------- |
| Range `min_val`, `max_val`                            | `0` to `1`      | In **Force units**.                                         |
| Force units `units`                                   | `Newtons`       | `Newtons`, `Pounds`, `KilogramForce`.                       |
| Bridge configuration `bridge_config`                  | `FullBridge`    | `FullBridge`, `HalfBridge`, `QuarterBridge`.                |
| Voltage excitation source `voltage_excit_source`      | `Internal`      | `Internal`, `External`, `None`.                             |
| Voltage excitation value `voltage_excit_val`          | `0`             | In volts.                                                   |
| Nominal bridge resistance `nominal_bridge_resistance` | `1`             | In ohms.                                                    |
| Forward coefficients `forward_coeffs`                 | `[]`            | Polynomial coefficients from electrical to physical values. |
| Reverse coefficients `reverse_coeffs`                 | `[]`            | Polynomial coefficients from physical to electrical values. |
| Electrical units `electrical_units`                   | `mVoltsPerVolt` |                                                             |
| Physical units `physical_units`                       | `Newtons`       |                                                             |

**Force bridge table**

#### [Force bridge table](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_force_bridge_table)

Python `AIForceBridgeTableChannel`TypeScript `ai_force_bridge_table`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1ga87df6b93520dde3b4e4cfbf99e3cdb66.html)

Reads force from a bridge, such as a load cell. A table of calibration points converts the electrical value to force.

| Setting                                               | Default         | Notes                                        |
| ----------------------------------------------------- | --------------- | -------------------------------------------- |
| Range `min_val`, `max_val`                            | `0` to `1`      | In **Force units**.                          |
| Force units `units`                                   | `Newtons`       | `Newtons`, `Pounds`, `KilogramForce`.        |
| Bridge configuration `bridge_config`                  | `FullBridge`    | `FullBridge`, `HalfBridge`, `QuarterBridge`. |
| Voltage excitation source `voltage_excit_source`      | `Internal`      | `Internal`, `External`, `None`.              |
| Voltage excitation value `voltage_excit_val`          | `0`             | In volts.                                    |
| Nominal bridge resistance `nominal_bridge_resistance` | `1`             | In ohms.                                     |
| `electrical_vals`                                     | `[]`            | Electrical values for table.                 |
| `physical_vals`                                       | `[]`            | Physical values for table.                   |
| Electrical units `electrical_units`                   | `mVoltsPerVolt` |                                              |
| Physical units `physical_units`                       | `Newtons`       |                                              |

**Force bridge two-point linear**

#### [Force bridge two-point linear](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_force_bridge_two_point_lin)

Python `AIForceBridgeTwoPointLinChannel`TypeScript `ai_force_bridge_two_point_lin`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1ga2e610b43e3c00dac59d46de4c609b2ad.html)

Reads force from a bridge, such as a load cell. Two calibration points convert the electrical value to force.

| Setting                                               | Default         | Notes                                        |
| ----------------------------------------------------- | --------------- | -------------------------------------------- |
| Range `min_val`, `max_val`                            | `0` to `1`      | In **Force units**.                          |
| Force units `units`                                   | `Newtons`       | `Newtons`, `Pounds`, `KilogramForce`.        |
| Bridge configuration `bridge_config`                  | `FullBridge`    | `FullBridge`, `HalfBridge`, `QuarterBridge`. |
| Voltage excitation source `voltage_excit_source`      | `Internal`      | `Internal`, `External`, `None`.              |
| Voltage excitation value `voltage_excit_val`          | `0`             | In volts.                                    |
| Nominal bridge resistance `nominal_bridge_resistance` | `1`             | In ohms.                                     |
| Electrical value one `first_electrical_val`           | `0`             |                                              |
| Electrical value two `second_electrical_val`          | `1`             |                                              |
| Electrical units `electrical_units`                   | `mVoltsPerVolt` |                                              |
| Physical value one `first_physical_val`               | `0`             |                                              |
| Physical value two `second_physical_val`              | `1`             |                                              |
| Physical units `physical_units`                       | `Newtons`       |                                              |

**Force IEPE**

#### [Force IEPE](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_force_iepe)

Python `AIForceIEPEChannel`TypeScript `ai_force_iepe`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1gaa6ff3418553a70767e450e29bc380256.html)

Reads force from an IEPE force sensor.

| Setting                                          | Default           | Notes                                                                    |
| ------------------------------------------------ | ----------------- | ------------------------------------------------------------------------ |
| Range `min_val`, `max_val`                       | `0` to `1`        | In **Force units**.                                                      |
| Terminal configuration `terminal_config`         | `Cfg_Default`     |                                                                          |
| Force units `units`                              | `Newtons`         | `Newtons`, `Pounds`, `KilogramForce`.                                    |
| Sensitivity `sensitivity`                        | `0`               |                                                                          |
| Sensitivity units `sensitivity_units`            | `mVoltsPerNewton` | The select next to **Sensitivity**: `mVoltsPerNewton`, `mVoltsPerPound`. |
| Current excitation source `current_excit_source` | `Internal`        | `Internal`, `External`, `None`.                                          |
| Current excitation value `current_excit_val`     | `0`               | In amps.                                                                 |

**Pressure**

**Pressure bridge polynomial**

#### [Pressure bridge polynomial](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_pressure_bridge_polynomial)

Python `AIPressureBridgePolynomialChannel`TypeScript `ai_pressure_bridge_polynomial`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1ga96308d972bed1172d1cfec606a7061a5.html)

Reads pressure from a bridge-based pressure sensor. Polynomial coefficients convert the electrical value to pressure.

| Setting                                               | Default               | Notes                                                       |
| ----------------------------------------------------- | --------------------- | ----------------------------------------------------------- |
| Range `min_val`, `max_val`                            | `0` to `1`            | In **Pressure units**.                                      |
| Pressure units `units`                                | `PoundsPerSquareInch` | `Pascals`, `PoundsPerSquareInch`, `Bar`.                    |
| Bridge configuration `bridge_config`                  | `FullBridge`          | `FullBridge`, `HalfBridge`, `QuarterBridge`.                |
| Voltage excitation source `voltage_excit_source`      | `Internal`            | `Internal`, `External`, `None`.                             |
| Voltage excitation value `voltage_excit_val`          | `0`                   | In volts.                                                   |
| Nominal bridge resistance `nominal_bridge_resistance` | `1`                   | In ohms.                                                    |
| Forward coefficients `forward_coeffs`                 | `[]`                  | Polynomial coefficients from electrical to physical values. |
| Reverse coefficients `reverse_coeffs`                 | `[]`                  | Polynomial coefficients from physical to electrical values. |
| Electrical units `electrical_units`                   | `mVoltsPerVolt`       |                                                             |
| Physical units `physical_units`                       | `PoundsPerSquareInch` |                                                             |

**Pressure bridge table**

#### [Pressure bridge table](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_pressure_bridge_table)

Python `AIPressureBridgeTableChannel`TypeScript `ai_pressure_bridge_table`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1gad78a60f9ae005cd7533422aad9621f59.html)

Reads pressure from a bridge-based pressure sensor. A table of calibration points converts the electrical value to pressure.

| Setting                                               | Default               | Notes                                        |
| ----------------------------------------------------- | --------------------- | -------------------------------------------- |
| Range `min_val`, `max_val`                            | `0` to `1`            | In **Pressure units**.                       |
| Pressure units `units`                                | `PoundsPerSquareInch` | `Pascals`, `PoundsPerSquareInch`, `Bar`.     |
| Bridge configuration `bridge_config`                  | `FullBridge`          | `FullBridge`, `HalfBridge`, `QuarterBridge`. |
| Voltage excitation source `voltage_excit_source`      | `Internal`            | `Internal`, `External`, `None`.              |
| Voltage excitation value `voltage_excit_val`          | `0`                   | In volts.                                    |
| Nominal bridge resistance `nominal_bridge_resistance` | `1`                   | In ohms.                                     |
| `electrical_vals`                                     | `[]`                  | Electrical values for table.                 |
| `physical_vals`                                       | `[]`                  | Physical values for table.                   |
| Electrical units `electrical_units`                   | `mVoltsPerVolt`       |                                              |
| Physical units `physical_units`                       | `PoundsPerSquareInch` |                                              |

**Pressure bridge two-point linear**

#### [Pressure bridge two-point linear](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_pressure_bridge_two_point_lin)

Python `AIPressureBridgeTwoPointLinChannel`TypeScript `ai_pressure_bridge_two_point_lin`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1ga58a8c28527b09fa4182a2fab25fbfe57.html)

Reads pressure from a bridge-based pressure sensor. Two calibration points convert the electrical value to pressure.

| Setting                                               | Default               | Notes                                        |
| ----------------------------------------------------- | --------------------- | -------------------------------------------- |
| Range `min_val`, `max_val`                            | `0` to `1`            | In **Pressure units**.                       |
| Pressure units `units`                                | `PoundsPerSquareInch` | `Pascals`, `PoundsPerSquareInch`, `Bar`.     |
| Bridge configuration `bridge_config`                  | `FullBridge`          | `FullBridge`, `HalfBridge`, `QuarterBridge`. |
| Voltage excitation source `voltage_excit_source`      | `Internal`            | `Internal`, `External`, `None`.              |
| Voltage excitation value `voltage_excit_val`          | `0`                   | In volts.                                    |
| Nominal bridge resistance `nominal_bridge_resistance` | `1`                   | In ohms.                                     |
| Electrical value one `first_electrical_val`           | `0`                   |                                              |
| Electrical value two `second_electrical_val`          | `1`                   |                                              |
| Electrical units `electrical_units`                   | `mVoltsPerVolt`       |                                              |
| Physical value one `first_physical_val`               | `0`                   |                                              |
| Physical value two `second_physical_val`              | `1`                   |                                              |
| Physical units `physical_units`                       | `PoundsPerSquareInch` |                                              |

**Torque**

**Torque bridge polynomial**

#### [Torque bridge polynomial](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_torque_bridge_polynomial)

Python `AITorqueBridgePolynomialChannel`TypeScript `ai_torque_bridge_polynomial`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1ga533bdb964404f08e0b2895a43a14b7b8.html)

Reads torque from a bridge-based torque sensor. Polynomial coefficients convert the electrical value to torque.

| Setting                                               | Default         | Notes                                                       |
| ----------------------------------------------------- | --------------- | ----------------------------------------------------------- |
| Range `min_val`, `max_val`                            | `0` to `1`      | In **Torque units**.                                        |
| Torque units `units`                                  | `NewtonMeters`  | `NewtonMeters`, `InchPounds`, `FootPounds`, `InchOunces`.   |
| Bridge configuration `bridge_config`                  | `FullBridge`    | `FullBridge`, `HalfBridge`, `QuarterBridge`.                |
| Voltage excitation source `voltage_excit_source`      | `Internal`      | `Internal`, `External`, `None`.                             |
| Voltage excitation value `voltage_excit_val`          | `0`             | In volts.                                                   |
| Nominal bridge resistance `nominal_bridge_resistance` | `1`             | In ohms.                                                    |
| Forward coefficients `forward_coeffs`                 | `[]`            | Polynomial coefficients from electrical to physical values. |
| Reverse coefficients `reverse_coeffs`                 | `[]`            | Polynomial coefficients from physical to electrical values. |
| Electrical units `electrical_units`                   | `mVoltsPerVolt` |                                                             |
| Physical units `physical_units`                       | `NewtonMeters`  |                                                             |

**Torque bridge table**

#### [Torque bridge table](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_torque_bridge_table)

Python `AITorqueBridgeTableChannel`TypeScript `ai_torque_bridge_table`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1ga2d5889e6a7a4915ae340683b4cd1dc80.html)

Reads torque from a bridge-based torque sensor. A table of calibration points converts the electrical value to torque.

| Setting                                               | Default         | Notes                                                     |
| ----------------------------------------------------- | --------------- | --------------------------------------------------------- |
| Range `min_val`, `max_val`                            | `0` to `1`      | In **Torque units**.                                      |
| Torque units `units`                                  | `NewtonMeters`  | `NewtonMeters`, `InchPounds`, `FootPounds`, `InchOunces`. |
| Bridge configuration `bridge_config`                  | `FullBridge`    | `FullBridge`, `HalfBridge`, `QuarterBridge`.              |
| Voltage excitation source `voltage_excit_source`      | `Internal`      | `Internal`, `External`, `None`.                           |
| Voltage excitation value `voltage_excit_val`          | `0`             | In volts.                                                 |
| Nominal bridge resistance `nominal_bridge_resistance` | `1`             | In ohms.                                                  |
| `electrical_vals`                                     | `[]`            | Electrical values for table.                              |
| `physical_vals`                                       | `[]`            | Physical values for table.                                |
| Electrical units `electrical_units`                   | `mVoltsPerVolt` |                                                           |
| Physical units `physical_units`                       | `NewtonMeters`  |                                                           |

**Torque bridge two-point linear**

#### [Torque bridge two-point linear](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_torque_bridge_two_point_lin)

Python `AITorqueBridgeTwoPointLinChannel`TypeScript `ai_torque_bridge_two_point_lin`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1gac0648326f7b53707894030813e538950.html)

Reads torque from a bridge-based torque sensor. Two calibration points convert the electrical value to torque.

| Setting                                               | Default         | Notes                                                     |
| ----------------------------------------------------- | --------------- | --------------------------------------------------------- |
| Range `min_val`, `max_val`                            | `0` to `1`      | In **Torque units**.                                      |
| Torque units `units`                                  | `NewtonMeters`  | `NewtonMeters`, `InchPounds`, `FootPounds`, `InchOunces`. |
| Bridge configuration `bridge_config`                  | `FullBridge`    | `FullBridge`, `HalfBridge`, `QuarterBridge`.              |
| Voltage excitation source `voltage_excit_source`      | `Internal`      | `Internal`, `External`, `None`.                           |
| Voltage excitation value `voltage_excit_val`          | `0`             | In volts.                                                 |
| Nominal bridge resistance `nominal_bridge_resistance` | `1`             | In ohms.                                                  |
| Electrical value one `first_electrical_val`           | `0`             |                                                           |
| Electrical value two `second_electrical_val`          | `1`             |                                                           |
| Electrical units `electrical_units`                   | `mVoltsPerVolt` |                                                           |
| Physical value one `first_physical_val`               | `0`             |                                                           |
| Physical value two `second_physical_val`              | `1`             |                                                           |
| Physical units `physical_units`                       | `NewtonMeters`  |                                                           |

**Vibration and sound**

**Accelerometer**

#### [Accelerometer](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_accel)

Python `AIAccelChannel`TypeScript `ai_accel`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1gafb775e5a6d567ec88f38192356b47eaf.html)

Reads acceleration from an IEPE accelerometer.

| Setting                                          | Default       | Notes                                                          |
| ------------------------------------------------ | ------------- | -------------------------------------------------------------- |
| Range `min_val`, `max_val`                       | `0` to `1`    | In **Acceleration units**.                                     |
| Terminal configuration `terminal_config`         | `Cfg_Default` |                                                                |
| Sensitivity `sensitivity`                        | `0`           |                                                                |
| Sensitivity units `sensitivity_units`            | `mVoltsPerG`  | The select next to **Sensitivity**: `mVoltsPerG`, `VoltsPerG`. |
| Acceleration units `units`                       | `g`           | `g`, `MetersPerSecondSquared`, `InchesPerSecondSquared`.       |
| Current excitation source `current_excit_source` | `Internal`    | `Internal`, `External`, `None`.                                |
| Current excitation value `current_excit_val`     | `0`           | In amps.                                                       |

**Accelerometer 4-wire DC voltage**

#### [Accelerometer 4-wire DC voltage](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_accel_4_wire_dc_voltage)

Python `AIAccel4WireDCVoltageChannel`TypeScript `ai_accel_4_wire_dc_voltage`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1gaf3c2e5588e3464f607734acd27d52f79.html)

Reads acceleration from a 4-wire DC-voltage accelerometer.

| Setting                                           | Default       | Notes                                                          |
| ------------------------------------------------- | ------------- | -------------------------------------------------------------- |
| Range `min_val`, `max_val`                        | `0` to `1`    | In **Acceleration units**.                                     |
| Terminal configuration `terminal_config`          | `Cfg_Default` |                                                                |
| Acceleration units `units`                        | `g`           | `g`, `MetersPerSecondSquared`, `InchesPerSecondSquared`.       |
| Sensitivity `sensitivity`                         | `0`           |                                                                |
| Sensitivity units `sensitivity_units`             | `mVoltsPerG`  | The select next to **Sensitivity**: `mVoltsPerG`, `VoltsPerG`. |
| Voltage excitation source `voltage_excit_source`  | `Internal`    | `Internal`, `External`, `None`.                                |
| Voltage excitation value `voltage_excit_val`      | `0`           | In volts.                                                      |
| Use excitation for scaling `scaled_by_excitation` | `false`       | Scale the reading by the excitation voltage.                   |

**Accelerometer charge**

#### [Accelerometer charge](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_accel_charge)

Python `AIAccelChargeChannel`TypeScript `ai_accel_charge`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1ga5d74e4c3c40c2aaef12c5dab3d8f8277.html)

Reads acceleration from a charge-mode accelerometer.

| Setting                                  | Default            | Notes                                                                                                                                     |
| ---------------------------------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| Range `min_val`, `max_val`               | `0` to `1`         | In **Acceleration units**.                                                                                                                |
| Terminal configuration `terminal_config` | `Cfg_Default`      |                                                                                                                                           |
| Acceleration units `units`               | `g`                | `g`, `MetersPerSecondSquared`, `InchesPerSecondSquared`.                                                                                  |
| Sensitivity `sensitivity`                | `0`                |                                                                                                                                           |
| Sensitivity units `sensitivity_units`    | `PicoCoulombsPerG` | The select next to **Sensitivity**: `PicoCoulombsPerG`, `PicoCoulombsPerMetersPerSecondSquared`, `PicoCoulombsPerInchesPerSecondSquared`. |

**Velocity IEPE**

#### [Velocity IEPE](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_velocity_iepe)

Python `AIVelocityIEPEChannel`TypeScript `ai_velocity_iepe`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1ga0256a5337cbe48c93b7450f39f27386e.html)

Reads velocity from an IEPE velocity sensor.

| Setting                                          | Default                            | Notes                                                                                                 |
| ------------------------------------------------ | ---------------------------------- | ----------------------------------------------------------------------------------------------------- |
| Range `min_val`, `max_val`                       | `0` to `1`                         | In **Velocity units**.                                                                                |
| Velocity units `units`                           | `MetersPerSecond`                  | `MetersPerSecond`, `InchesPerSecond`.                                                                 |
| Terminal configuration `terminal_config`         | `Cfg_Default`                      |                                                                                                       |
| Sensitivity `sensitivity`                        | `0`                                |                                                                                                       |
| Sensitivity units `sensitivity_units`            | `MillivoltsPerMillimeterPerSecond` | The select next to **Sensitivity**: `MillivoltsPerMillimeterPerSecond`, `MilliVoltsPerInchPerSecond`. |
| Current excitation source `current_excit_source` | `Internal`                         | `Internal`, `External`, `None`.                                                                       |
| Current excitation value `current_excit_val`     | `0`                                | In amps.                                                                                              |

**Microphone**

#### [Microphone](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#ai_microphone)

Python `AIMicrophoneChannel`TypeScript `ai_microphone`[NI-DAQmx](https://www.ni.com/docs/en-US/bundle/ni-daqmx-c-api-ref/page/group__ni-daqmx__c__functions__channel__configuration__creation__create__analog__input__channels_1ga5853b2284aa81bf45003a815c092c46f.html)

Reads sound pressure from a microphone.

| Setting                                          | Default       | Notes                              |
| ------------------------------------------------ | ------------- | ---------------------------------- |
| Terminal configuration `terminal_config`         | `Cfg_Default` |                                    |
| Microphone sensitivity `mic_sensitivity`         | `0`           | In mV/Pa.                          |
| Max sound pressure level `max_snd_press_level`   | `0`           | In decibels, referenced to 20 µPa. |
| Current excitation source `current_excit_source` | `Internal`    | `Internal`, `External`, `None`.    |
| Current excitation value `current_excit_val`     | `0`           | In amps.                           |

### Custom scaling

Channels with **Custom scaling** convert the raw value before the Driver writes it. In the Console, the options are in the **Scale** section of the channel. In code, set `custom_scale` to one of these scales:

| Console option | Python class      | Fields                                                                                                                         |
| -------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| None           | `NoneScale`       | No scaling. This is the default.                                                                                               |
| Linear         | `LinearScale`     | **Slope** (`slope`, 1) and **Y-intercept** (`y_intercept`, 0).                                                                 |
| Map            | `MapScale`        | **Pre-scaled min** and **max** to **Scaled min** and **max** (`pre_scaled_min`, `pre_scaled_max`, `scaled_min`, `scaled_max`). |
| Polynomial     | `PolynomialScale` | **Forward coefficients** (`forward_coeffs`) and **Reverse coefficients** (`reverse_coeffs`), from c0 up.                       |
| Table          | `TableScale`      | **Pre-scaled** and **Scaled** pairs (`pre_scaled_vals`, `scaled_vals`). A CSV file can fill them.                              |

Every scale except **None** also has **Prescaled units** (`pre_scaled_units`, `Volts`) and **Scaled units** (`scaled_units`).

## Troubleshooting

* [configured sample rate ... is below device minimum ...](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#configured-sample-rate-is-below-device-minimum)

  * Cause

    The device cannot sample that slowly.

  * Fix

    Raise the **Sample rate** to at least the minimum in the description.

* [The task does not start, with an error that says the resource is reserved.](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#the-task-does-not-start-with-an-error-that-says-the-resource-is-)

  * Cause

    Another running task uses the analog inputs of the same module.

  * Fix

    Stop the other task, or move its channels into this task.

* [Port ... has already been used on another channel on the same device](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#port-has-already-been-used-on-another-channel-on-the-same-device)

  * Cause

    Two channels use the same port of one device.

  * Fix

    Change the port of one of them.

* [No device provided for channel ...](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#no-device-provided-for-channel)

  * Cause

    A Python channel has no `device`, and the task has no `device` either.

  * Fix

    Set one of them.

* [The network cannot keep up with the stream rate.](https://docs.synnaxlabs.com/reference/hardware/ni/analog-read-task#the-network-cannot-keep-up-with-the-stream-rate)

  * Cause

    The Driver cannot send the samples fast enough. The task shows “Failed to read data”, with this text in the description.

  * Fix

    Lower the **Stream rate**, so that each batch holds more samples.

For other problems, see [Configure an NI device](https://docs.synnaxlabs.com/reference/hardware/ni/configure-device#troubleshooting) and [Troubleshoot hardware](https://docs.synnaxlabs.com/reference/hardware/troubleshooting).
