Homing X+Y simultaneously

MSM Mill mode support
Post Reply
danielbriggs
Posts: 22
Joined: Sun Nov 16, 2014 8:49 am

Homing X+Y simultaneously

Post 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
User avatar
DaveCVI
Site Admin
Posts: 798
Joined: Mon Feb 04, 2013 3:15 pm
Contact:

Re: Homing X+Y simultaneously

Post 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
Attachments
All-RefAllHome.m1s
(7.18 KiB) Downloaded 638 times
Productivity Software for Personal CNC Machinists
http://www.CalypsoVentures.com
danielbriggs
Posts: 22
Joined: Sun Nov 16, 2014 8:49 am

Re: Homing X+Y simultaneously

Post 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
User avatar
DaveCVI
Site Admin
Posts: 798
Joined: Mon Feb 04, 2013 3:15 pm
Contact:

Re: Homing X+Y simultaneously

Post 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
Productivity Software for Personal CNC Machinists
http://www.CalypsoVentures.com
danielbriggs
Posts: 22
Joined: Sun Nov 16, 2014 8:49 am

Re: Homing X+Y simultaneously

Post 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
User avatar
DaveCVI
Site Admin
Posts: 798
Joined: Mon Feb 04, 2013 3:15 pm
Contact:

Re: Homing X+Y simultaneously

Post 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
Productivity Software for Personal CNC Machinists
http://www.CalypsoVentures.com
danielbriggs
Posts: 22
Joined: Sun Nov 16, 2014 8:49 am

Re: Homing X+Y simultaneously

Post 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
Post Reply