srkn43
Üye
- Katılım
- 17 Kas 2011
- Mesajlar
- 200
- Puanları
- 1
- Yaş
- 49
BUYRUN ARKADASLAR
Sub Main()
Dim ConfirmReady As String
Dim DoXY As String
Dim DoZ As String
Dim XaxisDRO As Integer
Dim YaxisDRO As Integer
Dim ZaxisDRO As Integer
Dim ToolDia As Integer
Dim platethickness As Integer
' notice the legacy SetDRO() command uses single digit values for xyzabc
XaxisDRO=0
YaxisDRO=1
ZaxisDRO=2
ConfirmReady = AskTextQuestion("DOKUNMATİK PLAKAYI YERLEŞTİRİN. (y/n)")
If ConfirmReady = "y" Then GoTo 1 Else GoTo 5
1:
DoXY = AskTextQuestion("X ve Y EKSENLERİDE SIFIRLANSINMI? (y/n)")
If DoXY = "y" Then GoTo 2 Else GoTo 3
2:
ToolDia = AskTextQuestion("KULLANACAGIN UCUN KALINLIGINI GİRİN?")
Message( "Auto Zeroing X..." )
SetDRO(XaxisDRO, 0.0000)
Sleep 100
If IsSuchSignal (22) Then
code "G31 X-2 F10"
While IsMoving()
Sleep 100
Wend
SetDRO(XaxisDRO, ToolDia/2)
Sleep 100
code "G1 X.5"
End If
Message( "Auto Zeroing Y..." )
SetDRO(YaxisDRO, 0.0000)
Sleep 100
If IsSuchSignal (22) Then
code "G31 Y-1 F10"
While IsMoving()
Sleep 100
Wend
SetDRO(YaxisDRO, ToolDia/2)
Sleep 100
code "G1 Y.5"
End If
3:
DoZ = AskTextQuestion("DOKUNMATIK PLAKA HAZIRMI DEVAM EDİLSİNMİ. (y/n)")
If DoZ = "y" Then GoTo 4 Else GoTo 6
4:
platethickness=AskTextQuestion("PLAKA KALINLIGI NEDIR")
Message( "Auto Zeroing Z...")
SetDRO(ZaxisDRO, 0.0000)
Sleep 100
If IsSuchSignal (22) Then
code "G31 Z-2 F10"
While IsMoving()
Sleep 100
Wend
SetDRO(ZaxisDRO,platethickness )
Sleep 100
code "G1 Z1"
End If
GoTo 6
5:
Message ("TAKIM SIFIRLAMA İPTAL EDİLDİ.")
GoTo 7
6:
Message "TAKIM SIFIRLAMA TAMAMLANDI EKSENLERİ KONTROL EDİN."
7:
End Sub
Sub Main()
Dim ConfirmReady As String
Dim DoXY As String
Dim DoZ As String
Dim XaxisDRO As Integer
Dim YaxisDRO As Integer
Dim ZaxisDRO As Integer
Dim ToolDia As Integer
Dim platethickness As Integer
' notice the legacy SetDRO() command uses single digit values for xyzabc
XaxisDRO=0
YaxisDRO=1
ZaxisDRO=2
ConfirmReady = AskTextQuestion("DOKUNMATİK PLAKAYI YERLEŞTİRİN. (y/n)")
If ConfirmReady = "y" Then GoTo 1 Else GoTo 5
1:
DoXY = AskTextQuestion("X ve Y EKSENLERİDE SIFIRLANSINMI? (y/n)")
If DoXY = "y" Then GoTo 2 Else GoTo 3
2:
ToolDia = AskTextQuestion("KULLANACAGIN UCUN KALINLIGINI GİRİN?")
Message( "Auto Zeroing X..." )
SetDRO(XaxisDRO, 0.0000)
Sleep 100
If IsSuchSignal (22) Then
code "G31 X-2 F10"
While IsMoving()
Sleep 100
Wend
SetDRO(XaxisDRO, ToolDia/2)
Sleep 100
code "G1 X.5"
End If
Message( "Auto Zeroing Y..." )
SetDRO(YaxisDRO, 0.0000)
Sleep 100
If IsSuchSignal (22) Then
code "G31 Y-1 F10"
While IsMoving()
Sleep 100
Wend
SetDRO(YaxisDRO, ToolDia/2)
Sleep 100
code "G1 Y.5"
End If
3:
DoZ = AskTextQuestion("DOKUNMATIK PLAKA HAZIRMI DEVAM EDİLSİNMİ. (y/n)")
If DoZ = "y" Then GoTo 4 Else GoTo 6
4:
platethickness=AskTextQuestion("PLAKA KALINLIGI NEDIR")
Message( "Auto Zeroing Z...")
SetDRO(ZaxisDRO, 0.0000)
Sleep 100
If IsSuchSignal (22) Then
code "G31 Z-2 F10"
While IsMoving()
Sleep 100
Wend
SetDRO(ZaxisDRO,platethickness )
Sleep 100
code "G1 Z1"
End If
GoTo 6
5:
Message ("TAKIM SIFIRLAMA İPTAL EDİLDİ.")
GoTo 7
6:
Message "TAKIM SIFIRLAMA TAMAMLANDI EKSENLERİ KONTROL EDİN."
7:
End Sub