Driver for Thorlabs motorized shutter (SH05 with KSC101)

Matlab driver for Thorlabs motorized optical shutter SH05(/M) controlled by KSC101 K-Cube Solenoid Controller
74 Downloads
Updated 22 Aug 2022

View License

This is a Matlab driver for Thorlabs motorized optical shutter SH05(/M) controlled by KSC101 K-Cube Solenoid Controller.
It is a class wrapper which calls the Kinesis .NET DLL library provided free from the Thorlabs.
Based on a code of Julan A.J. Fells - "Driver for Thorlabs motorized stages", which is acknowledged.
Example of usage:
>> shlist = shutter.listdevices % List connected devices
>> sh1 = shutter % Create a first shutter object
>> sh2 = shutter % Create a second shutter object
>> sh1.connect(shlist{1}) % Connect the first shutter object to the first device in the list
>> sh2.connect('68250440') % Connect the second shutter object to a device with a serial number 68250440
>> sh1.operatingmode % Get current operating mode for sh1
>> sh1.operatingmode='manual' % Set operating mode to Manual
>> sh1.operatingstate % Get current operating state
>> sh1.operatingstate='active' % Set operating state to Active, which in Manual mode opens the shutter
>> sh1.operatingstate='inactive' % Set operating state to Inactive, which in Manual mode closes the shutter
>> sh1.state % Get shutter state: 'Open' / 'Closed'
>> sh1.disconnect % Disconnect device

Cite As

Andriy Chmyrov (2024). Driver for Thorlabs motorized shutter (SH05 with KSC101) (https://www.mathworks.com/matlabcentral/fileexchange/95198-driver-for-thorlabs-motorized-shutter-sh05-with-ksc101), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2021a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: Driver for Thorlabs motorized stages

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.5

added an image

1.0.4

fixed an issue with connection initialization

1.0.3

new file added

1.0.2

updated the code and slightly changed the syntaxes

1.0.1

Added destructor method which tries to set the Operating State to ''inactive' and properly disconnects the device upon deletion of the object.
Added a check for an empty list of devices upon creation of the object.

1.0.0