by cncdrive » Sun Jan 22, 2017 11:28 am
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.