Hello Guest it is April 28, 2024, 11:24:22 PM

Author Topic: Mach4 + ESS Gcode for performing a homing cycle?  (Read 461 times)

0 Members and 1 Guest are viewing this topic.

Mach4 + ESS Gcode for performing a homing cycle?
« on: March 31, 2022, 05:15:53 PM »
I have a fully custom CNC machine with a rotary axis.  I expect that over several thousand cycles my error will compound in the rotary to necessitate a homing cycle.

Is this possible to do in Gcode directly?  That would be the preferred method for my application.

I'll have a loop that completes 1 or 2 thousand times, and then exit the loop to home, and then renter the loop for the next thousand or so.

Advice?
Re: Mach4 + ESS Gcode for performing a homing cycle?
« Reply #1 on: April 01, 2022, 05:52:41 PM »
Hi,
this post should be on the Mach4 General Discussion board, no doubt Tweakie will shift it there in due course.

Quote
Is this possible to do in Gcode directly?  That would be the preferred method for my application.


You might try g28 x...y...z...a... That will move the axes to the specified location, although I'm less certain that it zeros the machine coordinates.

You could do it with a macro. Your macro could be called m250 say. In the macro would be an APIs like:

Code: [Select]
LUA Syntax:
rc = mc.mcAxisHome(
number mInst,
number axisId)

Description:
Used to start an axis homing.

Thus every time you want the A axis to home just include a m250 in your Gcode.

Craig
« Last Edit: April 01, 2022, 05:58:27 PM by joeaverage »
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach4 + ESS Gcode for performing a homing cycle?
« Reply #2 on: April 01, 2022, 05:59:53 PM »
Hi,
just reading the MillGcode manual and g28 will cause the machine to move to the machine zero but it won't zero the machine coordinates.
g28.1 will however.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'