Hello Guest it is March 29, 2024, 06:24:58 AM

Author Topic: Home offset  (Read 2202 times)

0 Members and 1 Guest are viewing this topic.

Home offset
« on: November 01, 2016, 05:38:43 PM »
Using a Pokeys57CNC I'm trying to figure out the homing sequence. For the Z-axis the home switch is located 40 mm from Z--, therefore I put in home offset 40 mm. When the home switch is tripped:
  • the Z-coordinate is set to 40 mm (actual value is 39.something), due to deceleration the axis does not stop exactly at the limit switch)
  • then it continues with homing the Y and Z axis.

I would expect that the Z-axis would be moved to Z = 0 before homing the Y- and Z-axis. Homing with the Z-axis this low might lead to damage to any tool if the machine gets dereferenced with a workpiece inside. In this behavior standard, or did I miss an option?

Furthermore: my X-axis and Y-axis do not have homing sensors yet. Therefore I selected for these axis 'home in place'. The homing cycle is never finished (no messagebox pops up) and Mach4 is unresponsive (can not jog). Why does the homing sequence not end, or why does the PLC-script not resume. Is this a mistake in the setup of the homing sequence or parameters in either MAch4 or the Pokeys plugin, or is this due to the standard Homing script with the 'coroutine.yield()' statement?


Hope you can provide some guidance. Many thanks in advance.
Re: Home offset
« Reply #1 on: November 05, 2016, 10:08:01 PM »
I can't speak to the 2nd issue of the X and Y "home in place" and the home cycle not completing.  Try opening the Mach4 log window (Diagnostics->Logger, and then click the "play" button to enable it) and then try the home sequence.  See what it says.

As for the Z axis - the homing movement is supposed to leave the axis at (or very near) the home switch.  So the action you describe is correct.  If you want the axis moved somewhere else before the other axes start homing you will need to edit the homing script that is built into the Mach4 screen sets.  This is from memory so I may not have all the details exactly correct.  You can search the forums for info on editing the screen set and finding the "load scree"n" script that I mention below.

In the recent Mach4 builds (2914 and 3206) in the wx4 screen sets, the "Ref All Home" button runs a Lua script called RefAllHome().  That script is located in the "load screen" script in the screen set (or is it "screen load", I don't remember).  RefAllHome() does something like this (in build 3206 at least):

      Deref all axis
      HomeAllAxis

You will have to change this to something like this:

      DerefAllAxis()
      HomeAxis( inst, Z_AXIS )
      issue command to move Z axis to zero
      HomeAxis( inst, X_AXIS )
      HomeAxis( inst, Y_AXIS )

For the exact syntax and names of these functions, there is a help file names Mach4CoreAPI.chm in the Mach4Hobby\Docs directory.  Sorry to be so non-exact, but I am not at a PC with Mach4 on it.

Bob