Hello Guest it is March 28, 2024, 08:48:07 AM

Author Topic: Is there a Gcode command to reference all axis home?  (Read 2138 times)

0 Members and 1 Guest are viewing this topic.

Is there a Gcode command to reference all axis home?
« on: March 21, 2019, 06:36:24 PM »
When I am hogging material off for a rough clean up some times I lose a couple of steps. For the roughing it doesn't really matter, but it does on the following steps.

Is there a Gcode command that will reference all axis home?

I know about the G28 command but this only returns the axis to the home position, it doesn't appear to reference it from the switch if it's off a few steps.
Re: Is there a Gcode command to reference all axis home?
« Reply #1 on: March 21, 2019, 10:29:48 PM »
Hi,
no, there is no Gcode that does that.

There is however a Mach function that does it:

Quote
LUA Syntax:
rc = mc.mcAxisHomeAll(
   number mInst)

Description:
Used to start an axis homing.

Parameters: Parameter Description
mInst The controller instance.


Returns: Return Code Description
MERROR_NOERROR No Error.
MERROR_INVALID_INSTANCE The mInst parameter was out of range.
MERROR_NOT_NOW The operation could not be completed at this time.

Thus you could use the API in a macro.

Or you could call the RefAllHome() function (in the screen load script)

Code: [Select]
-- Ref All Home() function.
---------------------------------------------------------------
function RefAllHome()
    mc.mcAxisDerefAll(inst)  --Just to turn off all ref leds
    mc.mcAxisHomeAll(inst)
    coroutine.yield() --yield coroutine so we can do the following after motion stops
    ----See ref all home button and plc script for coroutine.create and coroutine.resume
    wx.wxMessageBox('Referencing is complete')
end

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Is there a Gcode command to reference all axis home?
« Reply #2 on: March 22, 2019, 08:47:45 AM »
There is a G Command that will home an axis.
G28.1   It is on page 37 of the mill programming manual. 
I just tested it here at work on a mill with the ESS and it works.
I found that it needs to be programmed like G28, with a G91
So, do the following.

G91 G28.1 Z 0.00
G91 G28.1 X 0.00 Y 0.00
G90

Be sure to set your machine back in absolute mode with the G90.
Chad Byrd
Re: Is there a Gcode command to reference all axis home?
« Reply #3 on: March 22, 2019, 09:23:52 AM »
Hi Chad.
Are you referring to the doc in the M4 download ? Mine is different.
Or are you in M3 ?
Thanks,
Russ

Offline Bill_O

*
  •  562 562
    • View Profile
Re: Is there a Gcode command to reference all axis home?
« Reply #4 on: March 22, 2019, 09:33:17 AM »
I am using the
G91 G28.1 X 0.00 Y 0.00
G90
in M4 and it works great.

Bill
Re: Is there a Gcode command to reference all axis home?
« Reply #5 on: March 22, 2019, 09:53:26 AM »
Hi Bill.
I don't doubt that it works in M4, as it worked well in M3 but I don't see it in the M4 manual. Mine goes from 28 to 30.  Do you have it in a M4 manual ?
Thanks
Re: Is there a Gcode command to reference all axis home?
« Reply #6 on: March 22, 2019, 10:06:01 AM »
It's in the Mach4 manual.  Page 37.
Chad Byrd
Re: Is there a Gcode command to reference all axis home?
« Reply #7 on: March 22, 2019, 10:07:12 AM »
Hello,

G28.1 is included in the Mill G Code Programming document in the Mach4 Docs folder. The one I'm looking at is version 1.1, build 3775 and is included in 4.2.3804 and onwards.

-Bryanna

Newfangled Solutions Helpdesk: http://support.machsupport.com
YouTube Support Channel: https://www.youtube.com/c/MachSupportOfficial
Re: Is there a Gcode command to reference all axis home?
« Reply #8 on: March 22, 2019, 10:19:53 AM »
Thanks bryannab,
I have 1.0 .
A day late and a dollar short again.
Cheers,
Russ
Oh, I got it here   
https://www.machsupport.com/help-learning/product-manuals/
You might want to update that.
« Last Edit: March 22, 2019, 10:22:19 AM by Overloaded »
Re: Is there a Gcode command to reference all axis home?
« Reply #9 on: March 22, 2019, 10:27:34 AM »
It's in the Mach4 manual.  Page 37.

Thanks Chad.
The current manual has not replaced the old one yet on the website under Mach4 Manuals.
Thanks,
Russ