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 ELOG logo
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.

Attachment 1: move_complete.m  78 Bytes  | Hide | Hide all
function move_complete(varargin)
    global moving;
    moving = false;
end
Attachment 2: throlabs_activex.m  3 kB  | Hide | Hide all
%% 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 ...
Attachment 3: animation.m  1 kB  | Hide | Hide all
% 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 ...
Attachment 4: draw_wafer.m  1003 Bytes  | Hide | Hide all
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 ...
ELOG V3.1.3-