Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: TTalma 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.
-
Hi,
no, there is no Gcode that does that.
There is however a Mach function that does it:
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)
-- 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
-
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.
-
Hi Chad.
Are you referring to the doc in the M4 download ? Mine is different.
Or are you in M3 ?
Thanks,
Russ
-
I am using the
G91 G28.1 X 0.00 Y 0.00
G90
in M4 and it works great.
Bill
-
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
-
It's in the Mach4 manual. Page 37.
-
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
-
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.
-
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
-
Russ,
Yeah, I have the newest profile from the FTP site on my computer at work, so my manual is updated, didn't even think about it not being in the older manuals.
-
My only problem with the G28.1 is the speed is very slow.
I can not find how to change the speed.
-
You have said the error is small. You could do a high speed move to a location near home before the G28.1 command to speed things up.
-
That'w what I was going to suggest.
It homes as if you clicked the Reference button; command a G53 move close to Axis Zero.
-
The home speed is configured in Homing/Softlimits tab as a percentage of the axis' maximum velocity. The axis maximum velocity is derived from the slowest of the motors that run the axis (Motors tab).
Steve