извините что не отвечал, толь ко с командировки с Киева
МОМ написал(а):подскажи подробней пожалуйста КАК ПОПРАВИТЬ ИЛИ ИСПРАВИТЬ СКРИПТ КНОПКИ
нужно видеть сам скрин, но если есть кнопка обнуления то делаем так
в меню сверху есть кноака Operator , далее Edit Button Script
и потом нажимает нужную кнопку , и откроется редактор скриптов
вот там и правим
сам скрипт находится в файле HiddenScript.m1s
по адресу C:\Mach3\macros\Mill(жирным папка профиля который используете )
если стандартный скрипт обнуления такой (это стандартный дюймовый , но это неважно)
Rem VBScript To probe In the z axis
If GetOemLed (825) <> 0 Then 'Check to see if the probe is already grounded or faulty
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Else
Code "G4 P1" 'Pause 1 seconds to give time to position probe plate
PlateOffset = GetUserDRO(1151) 'Get plate offset DRO
CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
Code "F30" 'slow down feedrate to 4 ipm
Rem Probe in the z direction
ZNew = GetDro(2) - 5 'probe move to current z - 2 inches
Code "G31Z" &ZNew
While IsMoving() 'wait for probe move to finish
Wend
ZNew = GetVar(2002) 'read the touch point
Code "G0 Z" &ZNew 'move back to hit point incase there was overshoot
While IsMoving ()
Wend
If PlateOffset <> 0 Then
Call SetDro (2, PlateOffset) 'set the Z axis DRO to plate thickness
Code "G4 P1" 'Pause for Dro to update.
ZNew = PlateOffset + 30
Code "G0 Z" &ZNew 'put the Z retract height you want here
Code "(Z axis is now zeroed)" 'puts this message in the status bar
End If
Code "F" &CurrentFeed 'Returns to prior feed rate
End If
то наш будет такой
Rem VBScript To probe In the z axis
SafeZ = GetOemDRO(54)
Xend=100
Yend=100
If GetOemLed (825) <> 0 Then 'Check to see if the probe is already grounded or faulty
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Else
Code "G4 P1" 'Pause 1 seconds to give time to position probe plate
PlateOffset = GetUserDRO(1151) 'Get plate offset DRO
CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
Code "F30" 'slow down feedrate to 4 ipm
Rem Probe in the z direction
ZNew = GetDro(2) - 5 'probe move to current z - 2 inches
Code "G31Z" &ZNew
While IsMoving() 'wait for probe move to finish
Wend
ZNew = GetVar(2002) 'read the touch point
Code "G0 Z" &ZNew 'move back to hit point incase there was overshoot
While IsMoving ()
Wend
If PlateOffset <> 0 Then
Call SetDro (2, PlateOffset) 'set the Z axis DRO to plate thickness
Code "G4 P1" 'Pause for Dro to update.
ZNew = PlateOffset + 30
Code "G0 Z" &SafeZ
Code "G0X" &Xend & "Y" &Yend
Code "(Z axis is now zeroed)" 'puts this message in the status bar
End If
Code "F" &CurrentFeed 'Returns to prior feed rate
End If
выделенным показал изменения
после касания инструмент подымится на безопасную высоту (SafeZ = GetOemDRO(54) или можно указать SafeZ = 100, тогда на высоту 100)
и после поднятия переедет в координаты 100 100 заданные в Xend Yend - меняя их мы отправим в любую точку
Отредактировано dizzyy (24-12-2014 23:29:00)
- Подпись автора
[img]http://nick-name.ru/forum/dizzyy.gif[/img]