Appendix C
Control programs listing
C1. Deposition tests -
TEST01
Private Sub Command1_Click()
'this sequence commands the linear motor stepper to generate drops MSComm1.CommPort = 1 MSComm1.Settings = "9600,n,8,1" MSComm1.PortOpen = True MSComm1.Output = Chr(Val(passiin.Text)) MSComm1.Output = Chr(Val(vel.Text)) MSComm1.PortOpen = False
PauseTime = Val(pausain.Text) 'routine that makes a pause Start = Timer
Do While Timer < Start + PauseTime Rem DoEvents
Loop
AppActivate "WinPos", True 'activate WinPos to send instructions to the micropositioner PauseTime = 1
Start = Timer
Do While Timer < Start + PauseTime Rem DoEvents
Loop
SendKeys "%c", True 'open move dialogue SendKeys "o", True
SendKeys "%r", True 'set relative shifts
Dim r As Integer
For r = 1 To Val(ripet.Text) 'sequence to repeat starts
AppActivate "Position"
SendKeys "%z", True 'enters the deltaz value SendKeys "-" & deltaz.Text & "{Enter}", True
SendKeys "{BKSP 5}", True 'delete the characters
SendKeys deltaz.Text & "{Enter}", True 'enters the deltaz value to go back SendKeys "{BKSP 5}", True
SendKeys "%y", True 'enters the deltay value SendKeys deltay.Text & "{Enter}", True
SendKeys "{BKSP 5}", True
MSComm1.CommPort = 1
MSComm1.Output = Chr(Val(passi.Text)) MSComm1.Output = Chr(Val(vel.Text)) MSComm1.PortOpen = False
PauseTime = Val(pausa.Text) Start = Timer
Do While Timer < Start + PauseTime Rem DoEvents
Loop
Next r
MsgBox "finito!", vbInformation, "FINE" Beep
End Sub
Private Sub Command2_Click() End
End Sub
C2. Picking and releasing tests -
TEST03
Private Sub Command1_Click()
AppActivate "WinPos", True 'activate WinPos to send instructions to the micropositioner
PauseTime = 1 'pause
Start = Timer
Do While Timer < Start + PauseTime Rem DoEvents
Loop
SendKeys "%c", True 'open move dialogue SendKeys "o", True
SendKeys "%r", True 'set relative shifts
Dim r As Integer
For r = 1 To Val(ripet.Text) 'sequence to repeat starts
AppActivate "Position"
SendKeys "%z", True '-deltaz
SendKeys "-" & deltaz.Text & "{Enter}", True SendKeys "{BKSP 6}", True
SendKeys deltaz.Text & "{Enter}", True '+deltaz SendKeys "{BKSP 6}", True
SendKeys "%y", True '-deltay
SendKeys "-" & deltay.Text & "{Enter}", True SendKeys "{BKSP 6}", True
SendKeys "-" & deltax.Text & "{Enter}", True SendKeys "{BKSP 6}", True
SendKeys "%z", True '-deltaz
SendKeys "-" & deltaz.Text & "{Enter}", True SendKeys "{BKSP 6}", True
SendKeys deltaz.Text & "{Enter}", True '+deltaz SendKeys "{BKSP 6}", True
SendKeys "%y", True '+deltay
SendKeys deltay.Text & "{Enter}", True SendKeys "{BKSP 6}", True
SendKeys "%z", True '-deltaz
SendKeys "-" & deltaz.Text & "{Enter}", True SendKeys "{BKSP 6}", True
SendKeys deltaz.Text & "{Enter}", True '+deltaz SendKeys "{BKSP 6}", True
SendKeys "%x", True '+deltax
SendKeys deltax.Text & "{Enter}", True SendKeys "{BKSP 6}", True
SendKeys "%y", True 'shift to pick the following sphere SendKeys passo.Text & "{Enter}", True
SendKeys "{BKSP 6}", True
PauseTime = Val(pausa.Text) ' Imposta la durata. Start = Timer ' Imposta l'ora di inizio.
Do While Timer < Start + PauseTime
Rem DoEvents ' Passa il controllo ad altri processi. Loop MSComm1.CommPort = 1 MSComm1.Settings = "9600,n,8,1" MSComm1.PortOpen = True MSComm1.Output = Chr(Val(passi.Text)) MSComm1.Output = Chr(Val(vel.Text)) MSComm1.PortOpen = False Next r
MsgBox "finito!", vbInformation, "FINE" End Sub
Private Sub Command2_Click() End
C3. Picking and releasing tests with reduced speed -
TEST05
Private Sub Command1_Click()
AppActivate "WinPos", True PauseTime = 1
Start = Timer
Do While Timer < Start + PauseTime Rem DoEvents
Loop
SendKeys "%c", True SendKeys "o", True SendKeys "%r", True
AppActivate "Position"
SendKeys "%z", True 'water drop deposition SendKeys "-" & deltaz.Text & "{Enter}", True
SendKeys "{BKSP 6}", True
SendKeys deltaz.Text & "{Enter}", True SendKeys "{BKSP 6}", True
SendKeys "%y", True 'to position the syringe S1 over the sphere SendKeys "-" & deltay.Text & "{Enter}", True
SendKeys "{BKSP 6}", True SendKeys "%x", True
SendKeys "-" & deltax.Text & "{Enter}", True SendKeys "{BKSP 6}", True
SendKeys "%z", True 'to pick the sphere SendKeys "-" & deltaz.Text & "{Enter}", True
SendKeys "{BKSP 6}", True
SendKeys deltaz.Text & "{Enter}", True SendKeys "{BKSP 6}", True
SendKeys "%y", True 'to position the sphere over the water drop SendKeys deltay.Text & "{Enter}", True
SendKeys "{BKSP 6}", True
SendKeys "%z", True 'fast movement along z SendKeys "-1" & "{Enter}", True
SendKeys "{BKSP 6}", True
SendKeys "%v", True 'change to low velocity SendKeys "0.1" & "{Enter}", True
sel = Val(deltaz.Text) - 1
SendKeys "%z", True 'slow releasing SendKeys "-" & Str(sel) & "{Enter}", True
SendKeys "{BKSP 6}", True SendKeys "%z", True
SendKeys "{BKSP 6}", True
SendKeys "%v", True 'change to high velocity SendKeys "3" & "{Enter}", True
SendKeys "{BKSP 6}", True
SendKeys "%z", True 'fast movement along z SendKeys "1" & "{Enter}", True
SendKeys "{BKSP 6}", True MsgBox "finito!", vbInformation, "FINE" End Sub
Private Sub Command2_Click() End