Page 1 of 1

Homing X+Y simultaneously

Posted: Fri Jun 22, 2018 5:43 am
by danielbriggs
Hi there,
I'm running 2.3.14, and Mach3 3.043.066.
The CNC is a standard XYZ mill with ATC.
I'm running the normal MSM Mill Screenset.

I have the X/Y/Z home switches wired into separate inputs and homing works well Z, then Y, then X.
To save startup time, how can I edit the macro which does a REF-ALL to do Z first (obviously) then X and Y simultaneously?

A quick google suggested when using the standard Mach3 screenset, that this would work:

example:
To home X and Y together, then Z, use:
RefCombination(3)
DoButton(24)


However the MSM macros seem a bit more involved and supporting different lathe, mill-turn and mill functionality so I didn't want to go editing stuff all over the place.

Can you advise on what I need to change from the standard macros to allow simultaneous X/Y homing?

All the best,
Dan

Re: Homing X+Y simultaneously

Posted: Fri Jun 22, 2018 8:24 am
by DaveCVI
Hi,
the attached version of All-RefAllHome should do what you want. I added a switch to ref XY simultaneously instead of sequentially.
Find the line near the top of the script that says
Const SimulXYRef = false
and change it to
Const SimulXYRef = true

I compiled this, but have not tested it on a machine. It's a simple change though so should be OK.

Dave

Re: Homing X+Y simultaneously

Posted: Fri Jun 22, 2018 9:46 am
by danielbriggs
Hi Dave,
Thanks for the quick response.
I've copied in that file + changed the false to true. Restarted Mach... and now when pressing RefAll it homes the Z, then starts the Y homing, but X does nothing and the DRO remains yellow.
Both Y and Z go green.

Any ideas?

Cheers,
Dan

Re: Homing X+Y simultaneously

Posted: Fri Jun 22, 2018 10:52 am
by DaveCVI
Hi,
That is a bit odd. I ran the code on a simulation set up and it starts moving both X&Y together. I can't test past that point as the sim has no home switched to stop the ref motion.

If you know how to use the mach script editor, you can load up the code and step thru it to see what it does at each step.

Dave

Re: Homing X+Y simultaneously

Posted: Mon Jun 25, 2018 9:56 am
by danielbriggs
Hi Dave,
I've worked out the correct line of code is running in the scripts as it should; the logic you've added works.
The problem lies with the RefCombinations... it works for bit numbers, 1,2,4, for X/Y/Z axes... but does not work for any combination of axes (3,6,7 etc.)
Is this a problem with Mach? Or some kind of conflict between Mach and how MSM homes axes?

I'll give up on it if there's no easy fix, but I'm happy to try any other suggestions you've got.

Thanks,
Dan

Re: Homing X+Y simultaneously

Posted: Mon Jun 25, 2018 12:20 pm
by DaveCVI
Hi,
What motion device are you using? I ran a refcombination(3) and I see both X an Y DROs move together.
I see this on a sim setup (which looks to mach like a parallel port I think).

Could it be that your motion device does not correctly handle combined axis home commands from mach?

Dave

Re: Homing X+Y simultaneously

Posted: Mon Jun 25, 2018 1:14 pm
by danielbriggs
Possibly...
I'll keep looking into further over the next few days as time allows.
I'm using an Ethernet SmoothStepper if that helps.

Dan