40m
QIL
Cryo_Lab
CTN
SUS_Lab
TCS_Lab
OMC_Lab
CRIME_Lab
FEA
ENG_Labs
OptContFac
Mariner
WBEEShop
|
Coating Ring-down Measurement Lab elog |
Not logged in |
 |
|
Message ID: 173
Entry time: Thu Nov 10 14:13:34 2016
|
Author: |
gabriele |
Type: |
Electronics |
Category: |
Configuration |
Subject: |
MATLAB code to control Thorlabs stages |
|
|
To be used to automate the laser polishing. |
|
function move_complete(varargin)
global moving;
moving = false;
end
|
|
%% init the controllers
f1 = figure();
f2 = figure();
tstage = actxcontrol('MGMOTOR.MGMotorCtrl.1', [20 20 600 400], f1);
rstage = actxcontrol('MGMOTOR.MGMotorCtrl.1', [20 20 600 400], f2);
set(tstage, 'HWSerialNum', 27001029);
set(rstage, 'HWSerialNum', 27501183);
tstage.StartCtrl();
rstage.StartCtrl();
... 119 more lines ...
|
|
% try a sequence of movements
figure()
% laser position
a0 = acos(36/(75/2));
laser = [-75/2*sin(a0), 75/2*cos(a0)];
% initial position
t = 0;
... 59 more lines ...
|
|
function draw_wafer(translation, angle, laser)
d = 75; % diameter
f = 36; % distance of flat from center
a = acos(f/(d/2)); % half angle opening of the flat
% build wafer in reference position and orientation
phi = [linspace(a, pi-a, 100), linspace(pi+a, 2*pi-a, 100)];
coordinates = [-d/2*cos(phi); d/2*sin(phi)]';
coordinates(end+1,:) = coordinates(1,:);
... 25 more lines ...
|