Table of Contents

Breakout Board Configuration

The following excerpt from the Breakout Board example workflow demonstrates how to configure your Breakout Board and Breakout Board in Bonsai. This process comprises of the following steps:

~/workflows/hardware/breakout/configuration.bonsai workflow

NOTE

To learn more about the top-level configuration motif in every workflow involving ONIX hardware, visit the Configuration Chain Tutorial.

Creating an Acquisition Context

The CreateContext operator creates a ContextTask that defines the device driver and index where the hardware exists. The Driver property is set to "riffa" which is the name of the PCIe device used by ONIX. In this case, the Index property is set to 0 because there is only a single ONIX system. If a second system is used on the same computer, a second CreateContext operator would be required in its own configuration chain, with its Index property set to 1.

Configuring the Breakout Board

The ConfigureBreakoutBoard operator groups the properties for all the devices that the breakout board supports. Each device in the property pane can be expanded to expose individual properties that govern their behavior.

Tip

The Properties section of the ConfigureBreakoutBoard operator provides documentation on the effect of all of the breakout board's configuration settings.

To examine and edit the breakout board's properties, click on the Breakout Board node to select it. The properties pane will appear immediately right of the workflow editor. Expanding each of the devices within the properties pane provides access to their configuration settings. The following video demonstrates how properties were edited for the example workflow:

This video shows how the breakout board's properties are changed in Bonsai. Specifically, the AnalogIO Direction0 property is set to "Output", and the MemoryMonitor Enable property is set to "True". It's not necessary to repeat those steps if the workflow is copied/pasted into your editor because they are saved with the workflow.

Namely, the following properties were changed form their default values in the breakout board example workflow:

  • The BreakoutBoard's AnalogIO Direction0 property is set to Output.
  • The BreakoutBoard's MemoryMonitor Enable property is set to True.
  • The BreakoutBoard's OutputClock Gate property is set to True.

When the workflow is started, the current time (based on Coordinated Universal Time) is saved, along with global hardware parameters governing data acquisition. This is accomplished using a TimeStamp operator to capture the computer's wall clock time. The timestamp is saved along with ContextTask's properties (e.g. AcquisitionClockHz, BlockReadSize, BlockWriteSize) to a csv file (start-time_<filecount>.csv) when the workflow is started.

Starting Acquisition

After starting a workflow, the StartAcquisition operator begins data acquisition with the hardware that has been configured. In the Breakout Board example workflow, most collected data is from the Breakout Board. The rate of data being produced by the hardware will be ~2.5 MB/s. The ReadSize property is set to 2048 bytes, meaning data collection will wait until 2048 bytes of data have been produced by the hardware. At 2.5 MB/s the hardware will produce 2048 bytes every ~800 μs. This is a hard bound on the latency of the system. If lower latencies were required, the hardware would need to produce data more quickly or the ReadSize property value would need to be reduced.

The WriteSize property is set to 2048 bytes. This determines the amount of memory that is preallocated for temporarily holding data before it is sent to hardware. It is less critical to performance unless the rate that data be written to the hardware is comparable to the rate that the hardware produces data, which is not a common scenario.

NOTE

For an overview of the devices on the Breakout Board that can be configured through the ConfigureBreakoutBoard operator, visit the Breakout Board Overview.