Page 1 of 1

Auto gantry squaring

PostPosted: Sun Jan 22, 2017 6:04 am
by shad
Is it possible now to make auto gantry squaring during homing procedure when X as main and A as slave axis ? :?:
Just I am see "Write offset on Homing" settings. This is it?
Thank you!

Re: Auto gantry squaring

PostPosted: Sun Jan 22, 2017 11:28 am
by cncdrive
The write offset on homing is the home coordinate.

If you set 2 different home switches for the master and the slave axis then they will home with squaring automatically.
What happens in this case is that the master and slave homes together and when the first home switch triggers that axis stops and the other axis continues to it's own home switch on it's own.
When it also triggers it's home switch then both axis moves off and the homing is finished.
If the 2 home switches are in square then the gantry is squared.

If the 2 home switches are not in square then the only solution is to write your own homing routine with calling the home button code and then unslave the master from the slave and command a movement and then slave the axis back.
There is a function for Slaving/Unslaving:

Function: void Slaveaxis(int masteraxis, int slaveaxis)
Description: This function slaves an axis to an axis. The masteraxis can be axis X, Y and Z axis (numbers 0, 1, 2 respectively) and the slave axis can be A, B and C axis (3, 4, 5 respectively). To remove the slave from the master axis use value 0 on the slaveaxis parameter.
Be careful with saving the axis settings when the slaveaxis function is in use. If the settings are saved without pressing the Apply settings button first then the slave parameter will be saved for the master axis!
Example: exec.Slaveaxis(0,3); //Makes A-axis slaving the X-axis.

Re: Auto gantry squaring

PostPosted: Sun Jan 22, 2017 1:03 pm
by Derek
Vmax wrote a macro for me that homes X and A then offsets a a certain amount (a value in the macro) and then recouples the 2 axis. Works like a champ.
You need switches on both axis.

Code: Select all
//Macro for squaring gantry Slaved X----->A

exec.Callbutton(107);  //RefHomeX
exec.Slaveaxis(0,0);   // Unslave X
exec.Code(" G91 G53 A0.100");    // Move to A Offset position
exec.Code(" G90");
exec.Slaveaxis(0,3);    //Reset Slave X ---> A

Re: Auto gantry squaring

PostPosted: Mon Jan 23, 2017 5:13 pm
by shad
Oh, thank you guys! Now I understand everything.