File Exchange

image thumbnail

Ocean Optics spectrometers - MATLAB Instrument Driver

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

13 Downloads

Updated

View License

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: http://www.mathworks.com/products/instrument

Comments and Ratings (13)

A

A (view profile)

@Pable Blinder, I have exactly the same issue with the wrapper...
>> wrapper = com.oceanoptics.omnidriver.api.wrapper.Wrapper();
Warning: A Java exception occurred trying to load the com/oceanoptics/omnidriver/api/wrapper/Wrapper class:
Java exception occurred:
java.lang.UnsupportedClassVersionError: com/oceanoptics/omnidriver/api/wrapper/Wrapper : Unsupported major.minor version
52.0

I am considering trying with windows 7... I updated the firmware of the USB2000 spectrometer and now the driver are properly installed in windows 10. However, I cannot see it with SpectraSuite which is quite weird. The HD4000 spectrometer works fine.

Pablo Blinder

Just installed but getting the following error...

>> demo_OceanOptics
Warning: A Java exception occurred trying to load the com/oceanoptics/omnidriver/api/wrapper/Wrapper class:
Java exception occurred:
java.lang.UnsupportedClassVersionError: com/oceanoptics/omnidriver/api/wrapper/Wrapper : Unsupported major.minor
version 52.0

Any clues?

Shuoqi Chen

Somehow I cannot successfully install the MATLAB instrument driver for Omnidriver using the toolstrip, but when I directly install the package using "Get Support Package: button it works fine.

Femtosecond

If you followed the instructions and still get weird Java warnings and error messages:
Check which version of OmniDriver you installed. I tried the latest version 2.46 from the OceanOptics website with Matlab R2012b and R2016a and it just did not work. After uninstalling version 2.46 and installing version 2.37 it worked right away!

Tim DeWolf

Lior

Lior (view profile)

Andrew, see the readme.txt attachment in the submission

It solved the problem for me

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?

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.

Reyner

Reyner (view profile)

Hi,

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

Thanks
=_)

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)
connect(spectrometerObj);

Any help ? Thanks

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.

Yao

Yao (view profile)

ricciclope

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

Updates

1.5

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

1.4

Adding copyright information.

MATLAB Release
MATLAB 8.0 (R2012b)

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

» Watch video

Win prizes and improve your MATLAB skills

Play today