# Configure an NI device

> Connect National Instruments DAQ hardware to the Driver and configure it for tasks.

The Driver connects to [National Instruments](https://www.ni.com/) hardware that works with NI-DAQmx: CompactDAQ chassis and modules, USB and PCIe DAQ devices, and PXI. It finds them through NI-DAQmx. Before a task can use a device, you configure it.

## Prerequisites

* Supported

  WindowsLinuxNI Linux RT

* Not supported

  macOSDocker

- Install [NI-DAQmx](https://www.ni.com/en/support/downloads/drivers/download.ni-daq-mx.html) on the computer that runs the Driver. If the Driver says that System Configuration is missing, install [NI System Configuration](https://www.ni.com/en/support/downloads/drivers/download.system-configuration.html).
- After you install, [restart the Driver](https://docs.synnaxlabs.com/reference/hardware/troubleshooting#restart-the-driver).

## How the Driver finds devices

The Driver looks for NI devices every few seconds. A device shows in the [devices toolbar](https://docs.synnaxlabs.com/reference/hardware/devices#devices-toolbar) with:

* **Name** -> `NI` and the model, such as `NI 9205` or `NI USB-6343`.
* **Location** -> the name of the device in NI-DAQmx, such as `Dev1` or `cDAQ1Mod1`. The Driver uses it to address the ports of the device, such as `Dev1/ai0`.

The key of an NI device is its serial number. Modules show under their chassis. The Driver skips CompactRIO controllers, but it finds the modules in them.

To stop the search, right-click the Driver in the devices toolbar and select **Toggle NI device scanner**.

## Configure a device

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

**Console**

1. In the devices toolbar, right-click the device and select **Configure**. You can also click **Configure** in the “New … connected” notification. To list each device that the Driver found, click and select **NI hardware**.
2. Enter a **Name** and an [**Identifier**](https://docs.synnaxlabs.com/reference/hardware/devices#identifiers), or click one of the identifiers that the Console suggests.
3. Click **Save**. To also open a read task for the device, click **Save and create read task**.

Configure each module that a task uses.

[](https://synnax.nyc3.cdn.digitaloceanspaces.com/docs/device-drivers/ni/configure-device/ni-configure-device-dark.mp4#t=0.001)

**Python**

Find the NI devices that the Driver found:

```python
for dev in client.devices.retrieve(makes=["NI"]):
    print(dev.key, dev.name, dev.model, dev.location)
```

Configure devices in the Console.

**TypeScript**

Find the NI devices that the Driver found:

```typescript
for (const dev of await client.devices.retrieve({ makes: ["NI"] }))
  console.log(dev.key, dev.name, dev.model, dev.location);
```

Configure devices in the Console.

Do not create NI devices in code. A device that you create has a different key than the device that the Driver finds, and the Console cannot use it.

## Troubleshooting

* [The device does not show in the devices toolbar.](https://docs.synnaxlabs.com/reference/hardware/ni/configure-device#the-device-does-not-show-in-the-devices-toolbar)

  * Cause

    The Driver cannot load NI-DAQmx, or it skips the device.

  * Fix

    * **NI-DAQmx is not installed** -> install NI-DAQmx and restart the Driver.
    * **The device has no name** -> check that NI MAX shows the device with a name. The Driver skips a device that has no name.

    For more causes, see [Troubleshoot hardware](https://docs.synnaxlabs.com/reference/hardware/troubleshooting#a-device-does-not-show-in-the-devices-toolbar).

* [The NI-DAQmx and System Configuration libraries are not installed on this system.](https://docs.synnaxlabs.com/reference/hardware/ni/configure-device#the-ni-daqmx-and-system-configuration-libraries-are-not-installe)

  * Cause

    The Driver cannot load the libraries. The task shows “Failed to create task”, with this text in the description.

  * Fix

    1. Install the software in the [prerequisites](https://docs.synnaxlabs.com/reference/hardware/ni/configure-device#prerequisites).
    2. Restart the Driver.

* [The device is temporarily unreachable. The Driver will keep trying to reach it.](https://docs.synnaxlabs.com/reference/hardware/ni/configure-device#the-device-is-temporarily-unreachable-the-driver-will-keep-tryin)

  * Cause

    The Driver lost the connection to the device. The task shows “Failed to read data” or “Failed to write commands”, with this text in the description.

  * Fix

    Check the cable and the power. The task continues when the device comes back.

For other problems, see [Troubleshoot hardware](https://docs.synnaxlabs.com/reference/hardware/troubleshooting).
