поиск центра в мач 3

Аватар автора
Практик
чпу. фреза.поиск центра.мач 3, Rem VBScript To center probe inside a pipe If GetOemLed (825) ﹤﹥ 0 Then &to see if the probe is already grounded or faulty Code "(Probe plate is grounded, check connection and try again)" Else FeedCurrent = GetOemDRO(818) &the current settings XCurrent = GetDro(0) YCurrent = GetDro(1) Code "G4 P1" &1 second to give time to position probe plate Code "F150" &feed rate to 150 mm/min Rem Probe Left XNew = Xcurrent - 25 &25 mm to left Code "G31 X" &XNew While IsMoving() &for the move to finish Wend XPos1 = GetVar(2000) &the probe touch location Code "G0 X" &XCurrent &move back to start point Rem Probe Right XNew = XCurrent + 25 &25 mm to right Code "G31 X" &XNew While IsMoving() Wend XPos2 = GetVar(2000) XCenter = (XPos1 + XPos2) / 2 &is midway between XPos1 and XPos2 Code "G0 X" &XCenter &move to the x center location Rem Probe up YNew = YCurrent + 25 Code "G31 Y" &YNew While IsMoving() Wend YPos1 = GetVar(2001) Code "G0 Y" &YCurrent Rem Probe down YNew = YCurrent - 25 Code "G31 Y" &YNew While IsMoving() Wend YPos2 = GetVar(2001) YCenter = (YPos1 + YPos2) / 2 Rem move To the center Code "G0 Y" &YCenter While IsMoving () Wend Code "F" &FeedCurrent &starting feed rate End If

0/0


0/0

0/0

0/0