Driver for Thorlabs BBD302/PRM1Z8/K10CR1 motorized stages
版本 1.0.4 (7.8 KB) 作者:
Andriy Chmyrov
Matlab class to control Thorlabs motorized translation/rotation stages such as MLS203/BBD30X/PRM1Z8/K10CR1
This is a Matlab driver to control Thorlabs motorized rotation stages PRM1Z8/K10CR1 and a translation stage MLS302 with a BBD302 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.
Check the GitHub page for possible updates.
Example of usage for Thorlabs K10CR1 rotational stage:
mlist=motor.listdevices % List connected devices
mot=motor % Create a motor object
mot.connect(mlist{1}) % Connect the first devce in the list of devices
mot.enable() % Enable the device (if needed)
mot.home() % Home the device
mot.moveto(45) % Move the device to the 45 degree setting
mot.moverel_deviceunit(-100000) % Move 100000 'clicks' backwards
mot.disable() % Disable the device (if needed)
mot.disconnect % Disconnect device
clear mot % Clear device object from memory
Example of usage for Thorlabs MLS203 translational stage with BBD302 controller:
motXY = motor; % create a motor object
motXY.connect('103205624') % connect to a controller with a serial number 103205624
motXY.enable % enable all channels
motXY.ishomed % check if channels are homed
motXY.home % perform homing for all channels
motXY.position % get the current position for all channels
motXY.moveto([15,25]) % move to position 15 mm on Ch1 and 25 mm on Ch2
motXY.maxvelocity = [10,50]; % set maxvelocity for movement to 10 mm/s for Ch1 and 50 mm/s for Ch2
motXY.acceleration = [500,500];% set acceleration to 500 mm/s2 for both channels
motXY.moveto([55,37.5]) % move to position [55 mm, 37.5], which is the center
motXY.disconnect % disconnect the device
clear motXY % Clear device object from memory
引用格式
Andriy Chmyrov (2025). Driver for Thorlabs BBD302/PRM1Z8/K10CR1 motorized stages (https://ww2.mathworks.cn/matlabcentral/fileexchange/102234-driver-for-thorlabs-bbd302-prm1z8-k10cr1-motorized-stages), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
创建方式
R2021b
兼容任何版本
平台兼容性
Windows macOS Linux标签
致谢
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.0.4 | added an image |
||
1.0.3 | improved listdevices() function and added enable/disable functions for rotational stages |
||
1.0.2 | added "EnableDevice()" call to the connection function - as requested |
||
1.0.1 | updated homing function to allow homing procedure for devices which do not necessary require it |
||
1.0.0 |