Cobra Spectrometers

Your Cobra spectrometer is an essential component of a spectral-domain optical coherence tomography (SD-OCT) system. SD-OCT systems require spectral measurement of interferometric signals at very high-speeds. A Cobra spectrometer with its high sensitivity and high speed is ideally suited for this application. Cobra spectrometers receive light input via a single-mode fiber connected with an FC/PC connector. Dispersive optics in the spectrometer direct different frequencies or wavelengths to different pixels in the sensor. This provides spectral information about the input the light signal. The electrical output from camera is transferred to a personal computer using a camera link connection.

 Data Flow

Showing flow of information from Cobra Spectrometer to visualization of output spectrum by the user. It is important to the make right choice of camera link card and software for your application.

Setting up the Cobra OCT SpectrometerCamera: Awaiba Dragster
Camera Link Card: NI-PCI-1433
Camera: Awaiba Dragster
Camera Link Card: DALSA LX1
Camera: Awaiba Dragster
Camera Link Card: Matrox Solios
Camera: SUI GL-2048
Camera Link Card: DALSA LX1
Camera: SUI GL-2048
Camera Link Card: NI PCI-1433
Camera Link Commands and Serial Reference

Setting up the Cobra OCT Spectrometer

This section provides generic instructions for setting up a Cobra spectrometer. Please note each model differs in shape, size and looks based on the selected configuration.

Step 1 Unpack items from the box that include Cobra Spectrometer and fiber optic cable. Based on choice of camera user will have appropriate power supply or a USB cable if the device USB powered. In addition user will have a sheet with a QR code and a cloud drive link where all relevant files are located. In certain cases user will receive another box provided by third party camera manufacturer.


 

Step 2 Connect FC/PC end of optical fiber to the spectrometer as shown. Light should be introduced to the FC/APC side of the spectrometer using a mating connector.


Step 3 Connect the smaller end of camera link cable(s), called SDR (Shrunk Delta Cables), to the spectrometer. Note in case the camera is being operated at a rate where medium or full camera link mode is used, two camera link cables are required.


 

Step 4 Connect the larger end of camera link cable(s), called MDR (Mini D Ribbon), to the camera link card installed in your computer.


Step 5 If the camera is USB powered like the Cobra with a Wasatch internal camera, connect the USB micro type B connector to the spectrometer and USB type A side of the cable to the power. In case any other camera is used (such as Basler, Dalsa, SUI), connect appropriate power to the camera.


Step 6 Insert the power supply to the wall outlet (120-220 V/50-60 Hz).

At this stage the Cobra OCT Spectrometer has been setup and we are ready to test it with control software. Control software talks to the spectrometer via the camera link card.

Continue to the section tabs at upper left for further detail on specific hardware combinations.

Camera: Wastach
Camera Link Card: NI-PCI-1433

To test Cobra spectrometer with National Instrument NI PCIe 1433 card make sure card is installed in the PC and Cobra spectrometer is connected as described in the Setting up the Cobra OCT Spectrometer tab to the left.

Software Prerequisites

  • Labview 2012 64-bit
  • NI-VISA Version 5.20
  • NI Vision Acquisition Software VAS_August2012.

Wasatch Photonics Specific Configuration Files

The following files are required, and are provided on an instrument specific configuration basis. Look for the QR code link to the cloud storage location for these files. The image shown here is an example of the sticker found on your device, with a QR code and short link (goo.gl/RDDNWn) pointing to the calibration information and configuration files for a particular instrument.

Download the following files from the provided WasPho.com entry to your local computer:

  • Wasatch-Cobra-NI1433-XX.icd
  • Cobra_Front_Panel.vi

All LabView related files can also be downloaded from our GitHub account.
https://github.com/WasatchPhotonics/CobraLabView

Important Note

If operating with a NI-1433 card, you must connect both camera link cables to the spectrometer and to the card. Although no data is moved across the second cable, there is a known issue with the NI-1433 cards that require both cables to be connected.

Measurement & Automation Explorer

1.  Copy the supplied Wasatch-Cobra-NI1433-Manual-Taps.icd file into the ni-imaqdata directory. This is usually located under: c:userspublicpublic documentsnational instrumentsni-imaqdata

 

2.  Start NI Measurement and Automation explorer, verify the software installation matches the screenshot shown here. As of this writing on 2015-04-09, the installation procedure has been tested with Labview 2012, NI-IMAQ 4.7 and NI-VISA 5.2. You may have different versions on your system. The versions shown the right are known to work on windows 7 and windows 8 systems.


3. Expand the tree in the left hand side: My System -> Devices and Interfaces -> NI-IMAQ Devices -> img0: NI-PCI-1433 -> Channel 0:

As shown in the screenshot here, you may see the Basler A504k camera auto selected. This is the default camera .icd file selected during the National Instruments IMAX installation process.


4. In step 1 above, the Wasatch-CobraSRC-NI1433-Manual-Taps.icd file was copied to the NI IMAX icd file directory. To select that file for usage in IMAX, right click the Channel 0 entry, Go to Camera -> Wasatch -> CobraSRC-NI-1433 file as shown in the image here.

Verify that the Width is changed to 2048 and the height to 100.

5. Close Measurement and Automation Explorer.

LabVIEW Configuration and Dashboard Program

We now provide a full configuration and dashboard LabVIEW program with purchase of our Cobra Spectrometers!

1.  Double click the ‘Cobra_Front_Panel.vi’ file, wait for Labview to load the interface. This program allows you to send control messages directly to the device over the serial port embedded in the CameraLink connection. Various other vendors expose a serial port through the camera link interface that any program can use. National Instruments only allows communication with this serial port through the LabVIEW interface.

2. Initially, data will not be streaming in the provided graphs and camera display. The camera itself must be configured first. The top left-hand portion of the interface (as seen in the image to the right) provides all of the possible configuration values for the spectrometer. By default these will be set to general values. Click on the “Set all” button to configure the instrument.


3. For debug purposes, the commands sent and received from the device can be seen in the text boxes below the controls. If a communication failure occurs, you will see “err” instead of “ok” in the text boxes. Details of these commands can be found in the instrument’s user guide.


4. Once configured, you will see data streaming in the graphs on the right.

 

 

Important Notes

If you receive an error saying that the device is already in use, you will need to close NI MAX. You can not have the same data displayed in MAX and LabVIEW at the same time.

If you are using the external trigger, be sure that the trigger frequency is fast enough. To get smooth data streaming like the internal triggering mode, you will need to use a trigger frequency close to 1kHz.

Acquisition of Data in IMAX

1. Start IMAX

2. Expand the tree in the left hand side:
My System -> Devices and Interfaces -> NI-IMAQ Devices -> img0: NI-PCI-1433 -> Channel 0:

3. Click Channel 0:, then click the Grab button.

4. Click the Histogram button.

 

 

 

 

5. Save File as a Tif

6. Open the tif in ImageJ, select a line of data in the image, click analyze->plot profile and you should see something like the following:

 

 

 

Important Note:

The MAX interface cannot be used simultaneously with the test_Cobra_serial.vi application. You’ll need to close MAX and make sure the test_Cobra_serial.vi application is running (not paused), in order to change values such as line time and integration time, then restart MAX to view the results.

Camera: Awaiba Dragster
Camera Link Card: DALSA LX1

To test Cobra spectrometer with Teledyne DALSA LX1 card make sure the card is installed in the PC and Cobra spectrometer is connected as described in the Setting up the Cobra OCT Spectrometer section.

Software Prerequisites

  • DALSA x64 Xcelera-CL version 1.01 or newerprograms and features
  • Teledyne DALSA CamExpert 7.40 or newer
  • TeraTerm 4.77

Wasatch Photonics Specific Configuration Files:

The following files are required, and are provided on an instrument specific configuration basis. Look for the QR code link to the cloud storage location for these files. The image shown here is an example of the sticker found on your device, with a QR code and short link (goo.gl/RDDNWn) pointing to the calibration information and configuration files for a particular instrument.

  • Cobra<model name>.ccf

Download configuration file for Dalsa 2k sensor.

What is a CCF file?

CCF stands for Camera Configuration File. It provides all of the baseline configurations such as integration time, triggering settings, and general camera name and serial number information. It’s a simple text file and can be opened in a text editor (Notepad) to manually view the settings and is used by CamExpert to automatically import this information.

Sapera Configuration

Start the Sapera Configuration program and assign the COM port for the camera link serial connection as shown. Reboot the computer for the serial port changes to take effect.

 

 

 

 

 

TeraTerm Configuration

1. Start Tera Term program, and assign serial port to use. Make sure the value selected here matches the COM Port selected in the Sapera Confguration above.

 

 

 

 

 

2. Assign the COM port settings as shown in the image:

 

3. Enter the following commands into the COM port window as shown in the image:
init <– initialize the spectrometer
gain 170 <– set a gain value for easier data visualization
lsc 1 <– set line scan active

 

CamExpert Visualization

1. Start the Sapera CamExpert Program.

2. Load the previously downloaded Cobra_<model name>.ccf file under configuration dropdown menu.


3. Click the ‘Grab’ button.

 

 

 

 

4. Click the Graph icon (circled in red) to the right of the Grab button, then choose the line profile option to verify that the spectrometer is returning high gain data.

 

 

 

5. The image to the right is the spectral output shown after clicking the Graph Icon.

 

Camera: Aaiba Dragster
Camera Link Card: Matrox Solios

To test Cobra Spectrometer using Matrox SOL2MEVCLF make sure the card is installed in the computer and the Cobra Spectrometer is connected as described in the Setting up the Cobra OCT Spectrometer section.

Software Prerequisites

Files/Programs to be installed

Wasatch Photonics Specific Configuration Files:

The following files are required, and are provided on an instrument specific configuration basis. Look for the QR code link to the cloud storage location for these files. The image shown here is an example of the sticker found on your device, with a QR code and short link (goo.gl/RDDNWn) pointing to the calibration information and configuration files for a particular instrument.

Configure COM Port

Verify that the windows device manager reports an installed COM port.

 

 

 

 

TeraTerm Configuration

1. Start the Tera Term program, and assign the serial port to use.

 

 

 

 

2. Assign the COM port settings as shown in the image to the right.

 

 

 

 

3. Enter the commands shown on the right into the TeraTerm interface:

 

 

 

MIL Control Center Configuration

1. Start the Matrox MIL Control center software:

 

 

 

 

 

2. Start the Intellicam Application:

 

 

 

 

 

 

3. Open the provided DCF camera configuration file:

 

 

 

 

 

4. Click the ‘Grab Safe’ button, then click stop. Save the file as a TIF (.tif)

 

 

 

 

 

5. Open the tif in ImageJ, select a line of data in the image, click analyze->plot profile.

Camera: SUI GL-2048
Camera Link Card: DALSA LX1

To test SUI Camera enabled Cobra Spectrometer with Teledyne DALSA LX1 card make sure the card is installed in the PC and Cobra spectrometer is connected as described in the Setting up the Cobra OCT Spectrometer section.

Software Prerequisites

DALSA x64 Xcelera-CL version 1.01 or newer

Teledyne DALSA CamExpert 7.40 or newer

 

Wasatch Photonics Specific Configuration Files:

The following files are required, and are provided on an instrument specific configuration basis. Look for the QR code link to the cloud storage location for these files. The image shown here is an example of the sticker found on your device, with a QR code and short link (goo.gl/RDDNWn) pointing to the calibration information and configuration files for a particular instrument.

  • COBRA_SensorsUnlimited_2048.ccf

Sapera Configuration

Start the Sapera Configuration program and assign the COM port for the camera link serial connection as shown. Reboot the computer for the serial port changes to take effect.

 

 

Important Note

Note that no serial configuration over camera link is required, as SUI cameras come from the factory pre-configured. They will automatically read from the sensor and put data on the camera link cable on power up.

CamExpert Visualization

1. Start the Sapera CamExpert Program.

2. Load the previously downloaded Cobra_<model name>.ccf file under configuration dropdown menu.

 

3. Click the ‘Grab’ button.

 

 


4. Click the Graph icon (at the far right of the icon bar), then choose the line profile option to verify that the spectrometer is returning high gain data.

 

 

 

 

5. The image to the right is the spectral output shown after clicking the Graph Icon

 

Camera: SUI GL-2048
Camera Link Card: NI PCI-1433

To test Cobra spectrometer with National Instrument NI PCIe 1433 card make sure card is installed in the PC and Cobra spectrometer is connected as described in the Setting up the Cobra OCT Spectrometer section.

Software Prerequisites

  • Labview 2012 64-bit
  • NI-VISA Version 5.20
  • NI Vision Acquisition Software VAS_August2012.

Wasatch Photonics Specific Configuration Files

The following files are required, and are provided on an instrument specific configuration basis. Look for the QR code link to the cloud storage location for these files. The image shown here is an example of the sticker found on your device, with a QR code and short link (goo.gl/RDDNWn) pointing to the calibration information and configuration files for a particular instrument.

Download the following files from the provided WasPho.com entry to your local computer:

  • GL2048L-10A_icd0170rev6.icd

Measurement & Automation Explorer

1. Copy the supplied GL2048L-10A_icd0170rev6.icd file into the ni-imaq\data directory. This is usually located under: c:\users\public\public documents\national instruments\ni-imaq\data

2. Start NI Measurement and Automation explorer, verify the software installation matches the screenshot shown here. As of this writing on 2015-04-09, the installation procedure has been tested with Labview 2012, NI-IMAQ 4.7 and NI-VISA 5.2. You may have different versions on your system. The versions shown the right are known to work on windows 7 and windows 8 systems.

 

 

3. Expand the tree in the left hand side: My System -> Devices and Interfaces -> NI-IMAQ Devices -> img0: NI-PCI-1433 -> Channel 0:

As shown in the screenshot here, you may see the Basler A504k camera auto selected. This is the default camera .icd file selected during the National Instruments IMAX installation process.

 

 

 

4. In step 1 above, the GL2048L-10A_icd0170rev6.icd file was copied to the NI IMAX icd file directory. To select that file for usage in IMAX, right click the Channel 0 entry, Go to Camera -> Goodrich -> GL2048L…rev6 file as shown in the image here.

Note that no serial configuration over camera link is required, as SUI cameras come from the factory pre-configured. They will automatically read from the sensor and put data on the camera link cable on power up.

5. Click the Grab button.

 

 

6. Click the Histogram button.

7. Click the ‘Save Image’ button, and save the file with a .TIF format.

 

8. Open the TIF file in ImageJ, select a line of data in the image, click analyze->plot profile and you should see something like the following:

 

Cobra Camera Link Commands

The spectrometer camera board has an FPGA that provides control of the linescan array and sends out data via the serial port in the Camera Link board and cable.The spectrometer is designed to conform to the Camera Link standards for pinouts and I/O. The spectrometer has been tested with Camera Link cards from Dalsa and National Instruments, but any card that conforms to the Camera Link standards should work.

Camera Link Card Requirements

For the 2048 pixel arrays, base Camera Link configuration is used. This requires one Camera Link cable connected to the top connector (closest to the USB connector). For base Camera Link, the bottom connector is not used. The Camera Link interface should be configured for 12-bits per port with interleaved pixels.

Control of the spectrometer happens via the serial port on the Camera Link card. The following parameter values should be used for the serial communications:

  • Baud Rate 9600
  • Parity None
  • Data bits 8
  • Stop bits 1

For external triggering the CC1 line on the base Camera Link connector is used. Triggering should use LVDS values compatible with the Camera Link itnerface, with trigger pulses that are at least 1 microsecond long.

Typical Setup Procedure

The following command sequence can be used to start generating lines from the camera. This sequence uses internal triggering and generates A-scans at a rate of 10,000/second. Please see the following section for a detailed description of the commands.

init
gain 100
offset 0
int 90
ltm 100
lsc 1

NOTE: To stop generating lines, use lsc 0. Be sure to use an lsc 0 command BEFORE changing int, gain, or offset.

NOTE2: The above commands MUST be sent prior to image capture. The instrument does not gather data until an lsc 1 command is sent.

Serial Command Specification

Initialize

Command: init
Response: ‘<ok>\n’
Remarks: Initializes sensor registers; must be done before any other commands.

System Reset

Command: srst
Response: ‘<ok>\n’ if value is accepted. ‘<err>\n’ otherwise.
Remarks: Resets sensor.

Gain

Command: gain
Response: ‘<ok>\n’
Remarks: Sets the sensor gain. Range is 0 to 255. This command can be sent without a parameter to read the current value. Only integer values are accepted

Offset

Command: offset
Response: ‘<ok>\n’
Remarks: Sets the sensor offset. Range is 0 to 255. This command can be sent without a parameter to read the current value. Only integer values are accepted

Integration Time

Command: int
Response: ‘<ok>\n’
Remarks: Sets the integration time in microseconds. The valid range is 1 to 32,767 us. This command can be sent without a parameter to read the current value. This should only be set when the camera is NOT scanning (i.e. after an lsc 0 command). The integration time must be at least 2 microseconds less than the line time (ltm).

Line Time

Command: ltm
Response: ‘<ok>\n’
Remarks: Sets the line time in microseconds. Valid range is 22 to 65,535 us. The ltm must be larger than the integration time. This command can be sent without a parameter to read the current value. This should only be set when the camera is NOT scanning (i.e. after an lsc 0 command).

Trigger Source

Command: ats <0 or 1>
Response: ‘<ok>\n’
Remarks: Sets the trigger source. A value of 0 designates an internal trigger and a value of 1 designates an external trigger. The default setting is the internal trigger generated from the line time. This should only be set when the camera is NOT scanning (i.e. after an lsc 0 command).

Line Scan Control

Command: ltm <0 or 1>
Response: ‘<ok>\n’
Remarks: Line scan control. Set to 1 to start scanning, set to 0 to stop scanning.