View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Ocean Optics spectrometers - MATLAB Instrument Driver

5.0 | 5 ratings Rate this file 22 Downloads (last 30 days) File Size: 50.1 KB File ID: #38572 Version: 1.5

Ocean Optics spectrometers - MATLAB Instrument Driver



07 Nov 2012 (Updated )

MATLAB instrument driver for Ocean Optics OmniDriver which supports a wide range of spectrometers

| Watch this File

File Information

MATLAB is a software environment and programming language used to configure and control instruments such as spectrometers, filter signals, make measurements, analyze data, and build test systems.

MATLAB supports Ocean Optics spectrometers through the Instrument Control Toolbox.

This MATLAB instrument driver requires Ocean Optics OmniDriver to be installed.

This is a basic MATLAB instrument driver and not specific to any specific spectrometer model. It is expected to work on all Ocean Optics spectrometer models supported by OmniDriver. However, this driver has not been tested on all Ocean Optics spectrometers.

We would appreciate feedback on this instrument driver. Please provide feedback using the submission reviews feature on this page. Please include what instrument model you used with this driver.

For additional information on MATLAB instrument drivers visit the Instrument Control Toolbox product page:

Required Products Instrument Control Toolbox
MATLAB release MATLAB 8.0 (R2012b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (9)
10 Aug 2016 Tim DeWolf

05 Jan 2015 Lior

Lior (view profile)

Andrew, see the readme.txt attachment in the submission

It solved the problem for me

28 Aug 2014 Andrew Harris

I am having the same issue as Andres using R2014a:

Error using icdevice/connect (line 112)
An error occurred while executing the driver connect code.
Unsuccessful connect: Cannot connect to the device. Possible reason is javalibrarypath.txt/librarypath.txt is not
configured properly to load OmniDriver.
If this error is not an instrument error, use MIDEDIT to inspect the driver.

This is from the second function in the demo program. Any idea how to solve?

Comment only
26 Feb 2014 ss777

ss777 (view profile)

Hi, I am trying to control (external trigger) ocean optics light source using Matlab. I will really appreciate if get a sample code.

Comment only
23 Sep 2013 Reyner

Reyner (view profile)


I'm using ver.2012b and USB4000, I had it working and running able to take data for LabVIEW but when I tried connecting the device in MATLAB it gave me the error, I typed "*IDN?" in "Data to write:" and clicked "Query" and it gave me these errors:

-An error occured while communicating with the instrument

Any form of help will be highly appreciated


Comment only
12 Jun 2013 Andres

Andres (view profile)

I'm using 2012b and a USB2000 spectrometer, once I run the program it shows this:

Error using icdevice/connect (line 113)
An error occurred while executing the driver connect code.
Spectrometer not found, Please make sure the spectrometer is connected properly.
If this error is not an instrument error, use MIDEDIT to inspect the driver.

Error in demo_OceanOptics (line 24)

Any help ? Thanks

Comment only
21 May 2013 Ryan Hahn

This worked for me for 2011.

How would you go about doing it for a dual channel spectrometer? The plan is to compare a light source to the reflected wavelengths.

28 Mar 2013 Yao

Yao (view profile)

23 Jan 2013 ricciclope

Excelent!!! works fine at matlab 2012b, not for 2011

07 Nov 2012 1.4

Adding copyright information.

07 Jan 2013 1.5

Updating demo_OceanOptics.m to resolve the incorrect argument order while calling 'setCorrectForDetectorNonlinearity' and 'setCorrectForElectricalDark'.

Contact us