BB API
Theory of Operation

Any application using the BB60 API will follow these steps to perform measurements with a device:

  1. Open a device and receive a handle to the device resources.
  2. Configure the device.
  3. Acquire measurement data.
  4. Stop acquisitions and abort the current measurement.
  5. Repeat steps 2-5 for further measurements if desired.
  6. Close the device.
  7. (Recalibration)

The API provides functions for each step in this process. Each step is described in more detail below.

Opening a Device

Before opening a BB60, the device must be connected to the PC using the USB 3.0 cable, and the front panel LED should be solid green (or solid red to indicate a BB60D on standby). The bbOpenDevice function will attempt to open the device, and if successful return an integer handle that can be used to interface the device for the remainder of your program.

You can either have the API open the first valid BB60 device found on the system or specify the serial number of the device you wish to open. Get a list of all devices connected to the system using the bbGetSerialNumberList function.

Up to 8 devices may be connected to the API.

Configuring the Device

Once the device is open, the next step is to configure the device for a measurement. The available measurement modes are swept analysis, real-time analysis, I/Q streaming, and scalar network analysis using a Signal Hound tracking generator. Each mode has specific configurations routines, which set a temporary configuration state. Once all configuration routines have been called, calling the bbInitiate function copies the temporary configuration state into the active measurement state and the device is ready for measurements. The provided code examples showcase how to configure the device for each measurement mode.

Acquiring Measurement Data

After the device has been successfully configured, the API provides several functions for acquiring measurements. Only certain measurements are available depending on the active measurement mode. For example, I/Q data acquisition is not available when the device is in a sweep measurement mode. See the provided examples in the SDK.

Stopping the Measurements

Stopping all measurements is achieved through the bbAbort function. This causes the device to cancel or finish any pending operations and return to an idle state. Calling bbAbort is never required, as it is called by default if you attempt to change the measurement mode or close the device, but it can be useful to do this.

  • Certain measurement modes can consume large amounts of resources such as memory and CPU usage. Returning to an idle state will free those resources.
  • Returning to an idle state will help reduce power consumption.

Closing the Device

When finished making measurements, you can close the device and free all resources related to the device with the bbCloseDevice function. Once closed, the device will appear in the open device list again. It is possible to open and close a device multiple times during the execution of a program.

Recalibration

Calibration is an important part of the device’s operation. The device is temperature sensitive, and it is important a device is re-calibrated when significant temperature shifts occur (+/- 2 °C). Signal Hound spectrum analyzers are streaming devices and as such cannot automatically calibrate itself without interrupting operation/communication (which may be undesirable). Therefore, we leave calibration to the programmer. The API provides two functions for assisting with live calibration, bbGetDeviceDiagnostics and bbSelfCal. bbGetDeviceDiagnostics can be used to retrieve the internal device temperature at any time after the device has been opened. If the device ever deviates from its temperature by 2 degrees Celcius or more, we suggest calling bbSelfCal. Calling bbSelfCal requires the device be open and idle. After a self-calibration occurs, the global device state is undefined. It is necessary to reconfigure the device before continuing operation. One self-calibration is performed upon opening the device.

Note: The BB60C and BB60D do not require the use of bbSelfCal for device calibration. Instead, if the device deviates in temperature, simply call bbInitiate again which will re-calibrate the device at its current operating temperature.