This documentation supports the latest PCIe host firmware, the latest OpenEphys.Onix1 package, and Bonsai 2.9+.

Table of Contents

Hardware Configuration

Because ONIX supports a variety of hardware, our workflow needs to be configured to capture data from the specific headstages, miniscopes, etc. we are using with the system. This page covers this process.

Hardware Configuration Chain

Every ONIX workflow must begin with a hardware configuration chain that:

  1. Creates an ONI context for communicating with the hardware.
  2. Writes configuration properties to the hardware.
  3. Starts acquisition.

1. Create a context

An ONI context contains information about the device driver and the hardware index which enables it to communicate with the hardware. To create a context, place a CreateContext into the workflow. The context's device driver and index are set by editing the CreateContext's properties. The Driver property is typically set to "riffa" which is the name of the PCIe device used by ONIX, and the Index property is typically set to 0 though that can change if multiple ONIX systems are connected to your PC.

/workflows/operators/CreateContext.bonsai workflow

The context generated by CreateContext when the workflow starts is a data element named ContextTask.

2. Configure hardware elements

Hardware configuration is performed when ContextTask passes through a configuration operator. A configuration operator allows the user to configure hardware by editing its properties. There are two types of configuration operators: Device configuration operators and Device Group configuration operators. Device configuration operators allow configuration of a single device contained by a headstage, miniscope, or breakout board whereas Device Group configuration operators allow configuration of all devices contained by a headstage, miniscope, or breakout board.

/workflows/getting-started/configure.bonsai workflow

3. Start acquisition

The data acquisition process is started when ContextTask passes through StartAcquisition. StartAcquisition allows the user to set parameters that are related to data acquisition such as ReadSize and WriteSize. Setting the ReadSize property for a particular workflow is a balancing act of minimizing latency of data transfers from the ONIX system and avoiding data accumulation in the ONIX system's hardware buffer. To learn about the process of tuning ReadSize, check out the Optimizing Closed Loop Performance tutorial.

/workflows/getting-started/start-acquisition.bonsai workflow

At this point the workflow can be run to configure ONIX hardware, but it will immediately stop because no data source operators are present. The Data Acquisition page covers how to add them.