Znaleziono 2 wyniki

autor: andmar2005
20 lut 2015, 21:10
Forum: LinuxCNC (dawniej EMC2)
Temat: Problem z G38
Odpowiedzi: 4
Odsłony: 2218

no do macha - morze coś Cię nakieruje do rozwiązania problemu
autor: andmar2005
20 lut 2015, 20:31
Forum: LinuxCNC (dawniej EMC2)
Temat: Problem z G38
Odpowiedzi: 4
Odsłony: 2218

sprawdź to - ne pisałem tego gdzieś w sieci jest


If GetOemLed (825) <> 0 Then 'sprawdzanie stanu sondy
Code "(Płyta próby jest uziemiona sprawdź połączenie i spróbuj ponownie)"
Else
FeedCurrent = GetOemDRO(818) 'bieżące ustawienia
XCurrent = GetDro(0)
YCurrent = GetDro(1)

Code "G4 P1" 'Pauza 1 sek
Code "F400" 'Niska prędkość obrotów


Rem

XNew = XCurrent - 300
Code "G31 X" &XNew
While IsMoving()
Wend
XPos1 = GetVar(2000)

Code "G0 X" &XCurrent
While IsMoving()
Wend

Rem 'Sonda w dół

XNew = XCurrent + 300
Code "G31 X" &XNew
While IsMoving()
Wend
XPos2 = GetVar(2000)

XCenter = (XPos1 + XPos2) / 2
Code "G0 X" &XCenter
While IsMoving()
Wend

Rem

YNew = YCurrent + 300
Code "G31 Y" &YNew
While IsMoving()
Wend
YPos1 = GetVar(2001)

Code "G0 Y" &YCurrent
While IsMoving()
Wend

Rem 'Sonda w dół

YNew = YCurrent - 300
Code "G31 Y" &YNew
While IsMoving()
Wend
YPos2 = GetVar(2001)

YCenter = (YPos1 + YPos2) / 2
Code "G0 Y" &YCenter
While IsMoving()
Wend

Code "G4 P1"
While IsMoving()
Wend


Rem ' dokładny obmiar x
Code "G0 X" &XPos1 + 5
Code "F100"
While IsMoving()
Wend
Code " G91"
Code "G31 X-50"
While IsMoving()
Wend
Code " G90"
XPos3 = GetVar(2000)
Code "G0 X" &XCenter
Rem
Code "G0 X" &XPos2 - 5
While IsMoving()
Wend
Code " G91"
Code "G31 X+50"
While IsMoving()
Wend
Code " G90"
XPos4 = GetVar(2000)

XCenter2 = (XPos3 + XPos4) / 2
Code "G0 X" &XCenter2
While IsMoving()
Wend

Rem 'dokładny obmiar y odtąd w dół ma byc wszedzie Y
Code "G0 Y" &YPos1 - 5
While IsMoving()
Wend
Code " G91"
Code "G31 Y+50"
While IsMoving()
Wend
Code " G90"
YPos3 = GetVar(2001)
Code "G0 Y" &YCenter
While IsMoving()
Wend
Rem
Code "G0 Y" &YPos2 + 5
While IsMoving()
Wend
Code " G91"
Code "G31 Y-50"
While IsMoving()
Wend
Code " G90"
YPos4 = GetVar(2001)

YCenter2 = (YPos3 + YPos4) / 2
Code "G0 Y" &YCenter2
While IsMoving ()
Wend




Code "F" &FeedCurrent 'przywrócić początkową wartość obrotów
End If

Wróć do „Problem z G38”