Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Drew Pearce on November 12, 2013, 10:13:31 PM

Title: Auto Squaring Gantry
Post by: Drew Pearce on November 12, 2013, 10:13:31 PM
Hi All,

I'm a bit confused....

I have a 3 Axis Router table, with a Slave on the X Axis (2 drives on ball-screws), controlled through an Ethernet Smooth Stepper & BOB
At present, I only have 1 home switch on the X Axis, but am trying to upgrade to 2, so I can auto-square the gantry.

I have found several threads here, but have not worked out how to "start" getting Mach3 to home & correct the slave axis.

I’ve obviously missed a step somewhere

Thanks in advance

Drew
Title: Re: Auto Squaring Gantry
Post by: ger21 on November 12, 2013, 11:09:45 PM
You need two switches for Mach3 to square the gantry for you. You basically just set up the home switches in Ports and Pins for both the Master (X) and Slave axis (A?), and when you home, each side should home independently to their own switch. You need to make sure to UNCHECK "Home Slave with Master" in General Config. You may also need to modify your Ref All script to use RefCombination() to get the two sides to move together.

However, I've heard from several people that auto squaring slaved motors doesn't work correctly with the ESS. I've never used one, so I can't confirm that. There is apparently some type of workaround. You might want to contact Greg at Warp9 to see if there are any issues.
Title: Re: Auto Squaring Gantry
Post by: Drew Pearce on November 12, 2013, 11:17:06 PM
Thanks for the quick reply  :)

Will have to modify my limit switch so I can fine-tune its position.
(Its close, but not perfect)
Title: Re: Auto Squaring Gantry
Post by: rdean on November 13, 2013, 06:32:02 AM
I am using the ethernet smooth stepper for squaring my gantry with no problems.

Ray
Title: Re: Auto Squaring Gantry
Post by: Chaoticone on November 13, 2013, 09:37:50 AM
Thanks for the quick reply  :)

Will have to modify my limit switch so I can fine-tune its position.
(Its close, but not perfect)

You can set a home off distance in your homing and limits and modify the homing script to adjust the gantry for you. This can get a little bit tricky if your using soft limits. You would set the home off distance to whatever the gantry is out by and have the axis move to zero when it has finished its homing routine.
Title: Re: Auto Squaring Gantry
Post by: Drew Pearce on November 13, 2013, 04:23:40 PM
Gerry,
Was wondering, does your method home X then Slave Axis? Or actually moves X & Slave together while homing?
If it does them seperatly, that could be a major problem, and need to look into finding a good script


Ray,
Are you using any script? If so, any chance you could post it here :))
Any chance of a video of the sequence ? (long shot I know)


To All,
Hope to give all this another test over the weekend, so any extra info will be greatfull


Thanks to all

Drew
Title: Re: Auto Squaring Gantry
Post by: ger21 on November 13, 2013, 06:01:21 PM
Yes, the normal method moves both axis at the same time, each to their own switch.
Title: Re: Auto Squaring Gantry
Post by: rdean on November 13, 2013, 08:23:42 PM
I don't have a video but this is the way it works for me.

Z axis moves up or positive until it hits the limit switch and then reverses back down until off the switch.

Y axis moves in the negative direction until it hits the limit switch then reverses positive until it is off the switch.

X and B axis move in the negative direction together until one of them hits its limit and both motors stop.  The side that hit the limit first moves in the positive direction until it is off the switch.  Then the other side starts moving negative again until it hits its limit switch and then stops and reverses to get off the switch.  (This sequence is dependent on which side hits its limit first)
This is the Ref All Home script that I am using and it sets the work and machine coordinates to "0"

DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 26 )

DoOEMButton(133)
DoOEMButton(134)
DoOEMButton(135)

Notice here I am slaving the X and B axis together.  If you ever plan on running a rotary axis it has to be designated as the "A" axis for the rotational feed rate to work so  
I would suggest you set up your slave drive as "B" now to save problems later.

In the ESS setup screen under "Noise Filtering of Inputs" you may have to set a debounce time for the "Limits" and "Home" boxes to make it work properly.  
The ESS controls the debounce now not Mach3.  (Mine are set to 5 in each)

You should already have the "Motor Home/Soft Limits" ( this is where you set the ref speed and distance the drive reverses off the switch)  set up in Mach3 before running the script.
Each of my axis have their own limit switch and are on separate inputs.

I probably have forgotten something since it has been 2 years since I set mine up but it would be a good idea to "Step" through the script one line at a time for safety.

Ray


DoOEMButton(135)
Title: Re: Auto Squaring Gantry
Post by: Drew Pearce on November 13, 2013, 08:30:40 PM
Thanks Ray,
That makes sense :)
Title: Re: Auto Squaring Gantry
Post by: CraftMa on December 21, 2015, 09:53:45 AM
You need two switches for Mach3 to square the gantry for you. You basically just set up the home switches in Ports and Pins for both the Master (X) and Slave axis (A?), and when you home, each side should home independently to their own switch. You need to make sure to UNCHECK "Home Slave with Master" in General Config. You may also need to modify your Ref All script to use RefCombination() to get the two sides to move together.

However, I've heard from several people that auto squaring slaved motors doesn't work correctly with the ESS. I've never used one, so I can't confirm that. There is apparently some type of workaround. You might want to contact Greg at Warp9 to see if there are any issues.

Hi Ger21, I'm having a problem with this. When I uncheck home slave with master and save it when I come back it is always checked again.
Title: Re: Auto Squaring Gantry
Post by: garyhlucas on December 21, 2015, 03:51:12 PM
I have never worked with slaved axis but I would think they'd work better if when they are square that both motors are sitting on a full step and holding. Otherwise everytime you power up I would think the motors will both come to a full step and the gantry will be off by some fraction of a full step every time.
Title: Re: Auto Squaring Gantry
Post by: Raychar on December 27, 2015, 11:34:32 PM
In my gantry router machine, before I knew and understood in how this is set up as listed in these posts, I modified mygantry axis with synchronisation mechanically, that is, done by timing belt. Once setting up, it is supposed to have no square problem. Mach3 seems to have insufficient instructions on how gantry setting up!.....
Title: Re: Auto Squaring Gantry
Post by: SeabeeGizmo on March 13, 2019, 05:16:00 PM
OK I know this is an old reply to all of this but I am doing my build now.

 If you do not check the home slave, the slave does not home with the x. ???  My thought is that if you are close to the switches it would not hurt the gantry. If not ouch. So wht is the right way to do this.

Mach3, PMDX 126, Gecko 203 and stepper motors.

 Regards
Bruce