6553
« on: July 13, 2010, 08:57:21 PM »
I have not studied it but it at least will run like this:
Sub Main()
Dim ConfirmReady As String
Dim DoXY As String
ConfirmReady = AskTextQuestion("Confirm Touch plate circuit is grounded to bit (y/n).")
If ConfirmReady = "y" Then GoTo 1 Else GoTo 4
1:
Message "You entered " & ConfirmReady & "!"
DoXY = AskTextQuestion("Zero X and Y? (y/n)")
If DoXY = "y" Then GoTo 2 Else GoTo 3
2:
Message( "Auto Zeroing X..." )
If IsSuchSignal (22) Then
code "G31 X-2 F10"
While IsMoving()
Sleep 100
Wend
Call SetDRO( 0, .0625 )
code "G1 X.5"
End If
Message( "Auto Zeroing Y..." )
If IsSuchSignal (22) Then
code "G31 Y-1 F10"
While IsMoving()
Sleep 100
Wend
Call SetDRO( 1, .0625 )
code "G1 Y.5"
End If
3:
Message( "Auto Zeroing Z..." )
If IsSuchSignal (22) Then
code "G31 Z-2 F10"
While IsMoving()
Sleep 100
Wend
Call SetDRO( 2, .059 )
code "G1 Z1"
End If
GoTo 5
4:
Message ("Tool zeroing aborted Try again")
GoTo 6
5:
Message "Tool zeroing complete."
6:
End Sub
end