Auto gantry squaring

Post anything you want to discuss with others about the software.

Auto gantry squaring

Postby shad » Sun Jan 22, 2017 6:04 am

Hello!
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!
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 331
Joined: Thu Sep 15, 2016 5:23 pm

Re: Auto gantry squaring

Postby 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.
cncdrive
Site Admin
 
Posts: 4695
Joined: Tue Aug 12, 2014 11:17 pm

Re: Auto gantry squaring

Postby Derek » Sun Jan 22, 2017 1:03 pm

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
while(exec.IsMoving()){}
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
//EOF
Derek
 
Posts: 341
Joined: Mon Sep 05, 2016 9:57 am

Re: Auto gantry squaring

Postby shad » Mon Jan 23, 2017 5:13 pm

Oh, thank you guys! Now I understand everything.
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 331
Joined: Thu Sep 15, 2016 5:23 pm


Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 7 guests