Ocean Optics Spectrometer not working with instrument control toolbox on linux
3 views (last 30 days)
Show older comments
I would like to use the instrument control toolbox to control a spectrometer on linux. I installed the Omni Driver and downloaded the example but it doesn't work. The first line of the demo file:
spectrometerObj = icdevice('OceanOptics_OmniDriver.mdd');
gives "Unrecognized function or variable 'icdevice'". To be fair, it does say that this example requires a 64-bit Microsoft Windows system but I can't find any info on how to get this to work on a 64-bit linux system. Very disappointed.
1 Comment
jessupj
on 11 Aug 2022
is the command icdevice provided by the instrument control toolbox? check that it's installed by running ver
Answers (1)
Hornett
on 7 Feb 2024
The icdevice function is indeed part of MATLAB's Instrument Control Toolbox, which is designed to communicate with hardware like spectrometers. However, the drivers and examples provided by Ocean Optics are typically tailored for Windows environments.
Here are some steps you can take to try to get your spectrometer working on a Linux system:
- Check MATLAB Compatibility: Ensure that you have the Instrument Control Toolbox installed and licensed on your MATLAB installation.
- Install Linux-Compatible Drivers: You need to have the correct drivers installed for Linux that can communicate with your spectrometer. Ocean Optics provides an OmniDriver that supports Linux. Make sure you have followed the installation instructions provided by Ocean Optics for the Linux environment.
- Use Java Directly: Since the OmniDriver is Java-based, you can call Java functions directly from MATLAB. This is a more manual approach but can be used on Linux systems. You would use the javaclasspath function to add the OmniDriver JAR files to MATLAB's Java class path, and then use Java commands to interact with the spectrometer.
- Check MATLAB Java Version: MATLAB uses its own internal Java Runtime Environment. Ensure that the version of Java used by MATLAB is compatible with the OmniDriver.
- Use Python or C Libraries: If MATLAB's Instrument Control Toolbox does not support Linux for your device, you might need to resort to using Python or C libraries provided by Ocean Optics for Linux. You can then call these from MATLAB using the system command or the py.* interface for Python.
I hope it helps!
0 Comments
See Also
Categories
Find more on Instrument Control Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!