Skip to content

WasatchPhotonics/Wasatch.MATLAB

Repository files navigation

sample view

Overview

MATLAB demos and solutions using Wasatch Photonics spectrometers.

Application Notes

MATLAB has the interesting behavior that, after instantiating a WasatchNET.Spectrometer (or any .NET object, presumably), as soon as the CPU has some idle time (the user is not immediately running new commands, or ends the instantiation without a semicolon), the IDE appears to automatically traverse every Property "get" accessor in the order they are declared in the .NET Assembly (e.g., WasatchNET/Spectrometer.cs).

You can see these Property gettor calls in the Wasatch.NET debug log. They are mostly in alphabetical order, but a few unordered calls support the notion that they are called in source code declaration order.

Dependencies

The MATLAB demo requires a current release of Wasatch.NET, provided separately:

(Last tested with 2.4.14)

Common Errors

"Attempting to load FTD2XX.DLL from: C:\Program Files\Wasatch Photonics\Wasatch.NET"

The Wasatch.NET driver includes FTDI drivers for SPI-only "embedded" spectrometers. WasatchNET.Driver.openAllSpectometers should internally perform an encapsulated, temporary and non-invasive directory change when loading FTDI drivers to test for the presence of an Adafruit SPI-to-USB adapter.

However, if you see this error message in a pop-up dialog, you may need to manually 'cd' to C:\Program Files\Wasatch Photonics\Wasatch.NET or equivalent so that FTD2XX.dll and related files can be found. (You're free to 'cd' back to wherever you want after openAllSpectrometers() completes.)

History

  • 2023-09-26
    • show how to load virtual EEPROM from JSON (sample/*.json)
  • 2021-11-05
    • updated AreaScanSlow image line indexing
  • 2021-11-01
    • added AreaScanSlow (SiG), tested with Wasatch.NET 2.3.37 and MATLAB 2021b
  • 2021-11-01
    • added AreaScanFast (Hamamatsu), tested with Wasatch.NET 2.3.36 and MATLAB 2021b
  • 2019-12-10
    • updated .m script
  • 2019-12-09
    • resolved secondaryADC issues (Wasatch.NET 2.1.4)
  • 2019-12-06
    • updated for Wasatch.NET 2.1.3 after testing with MATLAB 2019b Update 2 (64-bit)

area scan

About

Matlab examples for Wasatch Photonics spectrometers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages