Hello Guest it is April 24, 2024, 12:36:51 PM

Author Topic: Go to zero  (Read 867 times)

0 Members and 1 Guest are viewing this topic.

Offline otpco

*
  •  48 48
    • View Profile
Go to zero
« on: October 28, 2022, 09:00:42 PM »
Hi all just doing a re build of my Moog 16 years ago I did the mach to my Moog ! Best thing ever thanks Art .. the drives have died .. rutex has finally stopped
 Mach drives now .. so I have the book put again .. when going  go to zero button how do you get z to retract first ? Is this doable . With the reload I can't get this sorted
 Also having a bit of trouble getting the z home to come back off the switch .. thanks to all I do like my mach

Offline reuelt

*
  •  520 520
    • View Profile
Re: Go to zero
« Reply #1 on: November 22, 2022, 03:33:56 AM »
My "Referencing all home macro" - Just for your reference & adaptation:-

Speak (" FASTER Referencing all home.") 'VOICE Alert

Message "************ FASTER Reference all home Started************"
Sleep (1000) ' Pause 1 second
CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
CurrentAbsInc = GetOemLED(48) 'Get the current G90/G91 state
CurrentGmode = GetOemDRO(819) 'Get the current G0/G1 state

DoOEMButton( 1024 ) ' Ref (home) Z Axis FIRST
While IsMoving()
Wend
DoOEMButton(135)  ' Zero Z Encoder

Code "G90"
If GetOemLed(801) Then 'imperial units check
  Code "G53 G0 Y1 X1"  'fast move to Y1 X1 in inches
Else
  Code "G53 G0 Y25 X25" 'fast move to Y25 X25 in mm
End If
While IsMoving()
Wend

DoOEMButton( 1023 )' Ref Y Axis
DoOEMButton( 1022 )' Ref X Axis
DoOEMButton( 1025 )' Ref A Axis
DoOEMButton( 1026 )' Ref B Axis
DoOEMButton( 1027 )' Ref C Axis

DoOEMButton(134)  ' Zero Y Encoder
DoOEMButton(133)  ' Zero X Encoder
DoOEMButton(136)  ' Zero A Encoder
DoOEMButton(137)  ' Zero B Encoder
DoOEMButton(138)  ' Zero C Encoder
While IsMoving()
Wend

Code "G54"
If CurrentAbsInc = 0 Then 'if G91 was in effect before then return to it
Code "G91"
End If
If CurrentGMode = 0 Then 'if G0 was in effect before then return to it
Code "G0"
End If   


Speak ("FASTER Reference all home Completed") 'Voice Alert
Message "************ FASTER Reference all home Completed************"
« Last Edit: November 22, 2022, 03:36:49 AM by reuelt »
"the gift of God is eternal life through Jesus Christ our Lord"