20200826 - Curved WG Multiscan NA=0.68 Pitch200 Um Radius (1)

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 6

;; Inscription Date: 26/08/2020

;; Code to write unidriectional couplers using sbends in Lithium Niobate for QUILT
project

;; Based on BeamProp code. Actually write rightmost coupler first (BeamProp rotated
clockwise 90 degrees).
;; Use of BeamProp code to determine waveguide parameters for wavelength 780 and
1550 nm (waveguides need to work for both wavelengths)

;; External inscription laser settings: frep = 100 kHz, compressor 10120 (~300 fs),
focus lens 0.68 NA
;; Internal inscription parameter settings: polarisation, power, inscription speeds
TBD below

;; Write a set of Curved Waveguides Profiles comprising of 25 individual


multiscans.
;; Variable between sets: Radius of curveture of WG

;;;;;Definitions;;;;;

;; #define refind 2.157 ;define extraordinary refractive index for substrate in z-


direction
#define refind 2.2343 ;define ordinary refractive index for substrate in x-/y-plane

;;;;;Declare variables;;;;
;Declare all the variable within the routine

DVAR $STARTX $STARTY $STARTZ $ORX $ORY $ORZ


;Calibrate origin position
DVAR $SLOPEX $SLOPEY
;Calibrate sample tilt
DVAR $ITER1 $ITER2 $ITER3 $ITER4
;Looping variables
DVAR $POWER $SPEED $POLARISATION $SCANNUM $SCANSEP $CRYSTALL $UOSL
;STANDARD SYSTEM VARIABLES
DVAR $XPROF $ARCRADIUS $ARCANDEG $ARCANRAD $COUNTER1 $NRAD
;NONCHANGING WAVEGUIDE DESIGN VARIABLES
DVAR $LTOTBOWY $LRUNIO
DVAR $ARCANRAD $LBX $LBY $LMX $LMY $LTOTX $LTOTY
;DEPENDENT WAVEGUIDE DESIGN VARIABLES:
DVAR $WGNUM $WGSEP
;NUMBER OF WAVEGUIDES PER INCRIPTION RUN
DVAR $COUNTER2 $DRADIUS $ITRADIUS $DARCANDEG $ITARCANDEG
;LOOP FOR INCREMENTAL COUPLER LENGTH
;DVAR $FILEPATH
;MOTION DATAFILE RECORDING

;DATACOLLECT ITEM RESET


;FILECLOSE

;$FILEPATH = FILEOPEN "C:\Users\pschlosser\Desktop\curvedWG.txt", 0


;$FILEPATH = FILEOPEN "Z:\Projects\Live\7012 QUILT\Gcode\G-Code Templates Couplers
& Splitters\20200506 - Curved_WG_Multiscan_pitch200um_Radius-sim.txt", 0

;DATACOLLECT ITEM 0, X, DATAITEM_PositionCommand


;DATACOLLECT ITEM 1, Y, DATAITEM_PositionCommand
;DATACOLLECT ITEM 2, Z, DATAITEM_PositionCommand
//HOME POSITIONS
$ORX = -27.450233
$ORY = -23.163708
$ORZ = 74.769938

//TILT CORRECTIONS
$SLOPEX = -0.004981
$SLOPEY = 0.001720

;;;;;Define starting position relative to corner;;;;;

$STARTX = 0.5 ;define write


start x axis as 0.5mm up from bottom edge of chip
$STARTY = -1 ;define write
start y axis as 1mm before start of chip edge
$STARTZ = 0.150/refind ;define write
start z axis as 250um/refractive index down into substrate. Optical path length
offset from surface

G82 ;Clear G92 (clear software home) ;reset


coordinate system

G90 ;Set absolute programming mode(target positions are relative to a "0" location
established by homing or a G92 command). ;move stages absolute

DWELL 0.2 ;Wait 0.2 seconds

G1 Z ($ORZ - 5) F 5 ;move in straight line


along z axis at speed 5, 5mm from start of chip lower left corner
G1 X ($ORX + $STARTX) Y ($ORY + $STARTY) F 5 ;Move to start positon ;move in
straight line along x and y axes at speed 5, to the offset start positions defined
above
G1 Z ($ORZ + $STARTZ + ($STARTX * $SLOPEX) + ($STARTY * $SLOPEY)) F 5 ;Move in
straight line along z axis at speed 5 to z offset start position whilst taking into
account tilt

G92 X0 Y0 Z0 ;Set current axis positions to the specified values i.e set current
position as origin - [0,0,0]

;;;;;Set write parameters;;;;;--------------------------------

;; STANDARD SYSTEM PARAMETERS:


$POWER = 30.5 ;Initial power (in mW)
$SPEED = 4 ;Initial Speed (mm/s)
$POLARISATION = 1 ;Initial Polarisation (0
- circ, 1 - vert , 2 - horiz)
$SCANNUM = 25 ;Number of multiscans to
writh one waveguide
$SCANSEP = 0.00033 ;Separation between the
lines in a multi scan waveguide
$WGSEP = 0.1 ;SEPARATION BETWEEN
INSCRIPTIONS
$WGNUM = 11 ;NUMBER OF INDIVIDUAL
COUPLERS
$CRYSTALL = 10 ;Crystal length (mm)
$UOSL = 1 ;Under/Overshoot length (mm)

;; CONSTANT WAVEGUIDE DESIGN PARAMETERS


$XPROF = 0.2 ;Profile of the bow in x
direction (perpendicular to direction of inscription)
$ARCRADIUS = 50 ;Radius of arcs used in
the S bend
$ARCANDEG = 2 ;Angle of arc to sweep
out in degrees

$COUNTER1 = 0 ;Iterative counter set


to 0 (required in loop 1 section to reduce the bend radius with each multiscan)
$NRAD = 0 ;Itterative radius set to 0
(required in loop 1 section to reduce the bend radius with each multiscan)
$COUNTER2 = 0 ;Iterative counter set
to 0 (required in loop 2 section to change coupler length for individual
waveguides)
$ITRADIUS = 0 ;Iterative Radius of
curvature set to 0 (required in loop 2 section to change radius of curvature of the
individual waveguides)
$ITARCANDEG = 0 ;Iterative ARCANGLE IN
DEGREES set to 0 (required in loop 2 section to change LENGTH OF ARC of the
individual waveguides)
$DRADIUS = 10 ;set to itterate by radius ;Change in radius
of curvature (required in loop 2 section to change radius of curvature for
individual waveguides)
$DARCANDEG = 0 ;set to itterate by angle ;Change in
ARCANGLE (required in loop 2 section to change radius of curvature for individual
waveguides)
;$ARCANRAD = $ARCANDEG * (Math.PI / 180) ;Angle of circle to
sweep out in radians

;DATACOLLECT START $FILEPATH, 1000, 1, 1

G91 ;Set incremental programming


mode (target positions are relative to the current axis location)

$global[1] = $POWER ;set power ;global variables


relate to labview and other things. global[0] has to be switched to change
something
$global[2] = $POLARISATION ;Set Polarisation

$global[0] = 1
WHILE $global[0] = 1 ;Wait for requested
change
DWELL 0.1
ENDWHILE

DWELL 1

;;;;;Reference guide

FOR $ITER1 = 1 TO 25 STEP 1

$global[3] = 0 ;open shutter


$global[0] = 1
DWELL 0.15

G1 Y ($CRYSTALL + 2 * $UOSL) Z (($CRYSTALL + 2 * $UOSL) * $SLOPEY) F $SPEED


$global[3] = 1 ;Close shutter
$global[0] = 1
DWELL 0.15

G1 Y -($CRYSTALL + 2 * $UOSL) Z -(($CRYSTALL + 2 * $UOSL) * $SLOPEY) F 15


G1 X $SCANSEP Z ($SCANSEP * $SLOPEX) F 5

NEXT $ITER1

G1 X (2*$WGSEP) Z ((2*$WGSEP) * $SLOPEX) F 5

;;;;;MULTI SCAN;;;;;

FOR $ITER2 = 1 TO $WGNUM STEP 1 ;NUMBER OF


INDIVIDUAL WAVEGUIDES PER INSCRIPTION RUN

$COUNTER2 = $ITER2 - 1 ;Counter for loop


itterations starting at zero
$ITRADIUS = $ARCRADIUS + ($DRADIUS * $COUNTER2) ;Change in radius
for each loop
$ITARCANDEG = $ARCANDEG + ($DARCANDEG * $COUNTER2) ;Change in arc
length for each loop
$ARCANRAD = $ITARCANDEG * (Math.PI / 180) ;Change in angle of
circle to sweep out in radians

FOR $ITER1 = 1 TO $SCANNUM STEP 1 ;CHANGE NUMBER OF


MULTI SCANS PER WAVEGUIDE

;-------------------------Calculated parameters----------------

;; DEPENDENT WAVEGUIDE DESIGN PARAMETERS:

$COUNTER1 = $ITER1 - 1 ;Counter for loop


itterations starting at zero
$NRAD = ($ITRADIUS -($SCANSEP*$COUNTER1)) ;Itterative radius
set to actual value dependend on loop iteration number (required in loop section to
reduce the bend radius with each multiscan)

$LBX = $NRAD * (1-COS($ARCANRAD)) ;Projected


displacement in X direction of the circle section
$LBY = $NRAD * (SIN($ARCANRAD)) ;Projected
displacement in Y direction of the circle section (direction of inscription)
$LMX = 2 * (-$LBX) + $XPROF ;Projected
displacement in X direction of the straight middle section between positive and
negative bend segments in dependence on the two coupler waveguide separation
(straight and bow)
$LMY = $LMX/TAN($ARCANRAD) ;Projected
displacement in Y direction of the straight middle section between positive and
negative bend segments in dependence on the two coupler waveguide separation
(straigth and bow)
$LTOTBOWY = 2 * $LBY + 1 * $LMY ;Total bow
shaped waveguide length in Y direction
$LRUNIO = ($CRYSTALL + 2 * $UOSL - $LTOTBOWY)/2 ;Run in/out
length of waveguide at start/end of waveguide dependent on the crystal length
$LTOTY = 2 * $LBY + 1 * $LMY + 2 * $LRUNIO ;Total
waveguide length in Y direction
$LTOTX = $XPROF ;Total waveguide
length in X direction
;-----------------------------------------------------------

;-----------------------------START: Bow shaped waveguide


(beamprop)------------------------------------------------------------------------

$global[3] = 0
;Open shutter to start exposing
$global[0] = 1

DWELL 0.15

VELOCITY ON

G1 Y ($LRUNIO) Z ($LRUNIO * $SLOPEY) F $SPEED


;move in straight line along y axis for run in right most
waveguide (beamprop)

G1 Z (($LBX * $SLOPEX) + ($LBY * $SLOPEY)) G2 X $LBX Y $LBY I $NRAD J 0


F $SPEED ;move in z for tilt G1 and G2 move clockwise in arc
at same time. Start of s bend
G1 X $LMX Y $LMY Z (($LMX * $SLOPEX) + ($LMY * $SLOPEY)) F $SPEED
;straight section of s bend
G1 Z (($LBX * $SLOPEX) + ($LBY * $SLOPEY)) G3 X $LBX Y $LBY I ($LBX -
$NRAD) J $LBY F $SPEED ;move anticlockwise in arc. End of s bend.
compensate in z

G1 Y $LRUNIO Z ($LRUNIO* $SLOPEY) F $SPEED


;output arm of right most coupler, compensating z

$global[3] = 1
;Close shutter to stop exposing
$global[0] = 1

VELOCITY OFF

DWELL 0.15

G1 Y -$LTOTY Z -($LTOTY * $SLOPEY) F 15


;MOVE BACK THE LENGTH OF THE Y-INSCRIPTION DISTANCE

;-----------------------------STOP: Bow shaped waveguide


(beamprop)------------------------------------------------------------------------

G1 X (-$LTOTX + $SCANSEP) Z ((-$LTOTX + $SCANSEP) * $SLOPEX) F 5


;MOVE IN X-DIRECTION BY MULTYSCAN SEPARATION, COMPENSATE
FOR TILT

NEXT $ITER1

G1 X $WGSEP Z ($WGSEP * $SLOPEX) F 5


;MOVE IN X-DIRECTION BY SEPARATION BETWEEN INDIVIDUAL
INSCRIPTIONS

NEXT $ITER2

;;;;;;;;Dump Laser Power at end of run;;;;;;;


$POWER = 0 ;set to zero
$global[1] = $POWER ;Set power

$global[0] = 1
WHILE $global[0] = 1 ;Wait for requested change
DWELL 0.1
ENDWHILE

;DATACOLLECT STOP
;FILECLOSE $FILEPATH

You might also like