This is a macro for moving the slaved axis a certain distance after homing. This is handy if your home switches are not exactly where they need to be. It is written for the A slaved to X and it moves the A axis .100". I have tested it numerous times and it works great. Obviously you will need to edit the axis numbers and offset distance accoring to your needs.
Big thanks to Vmax549 for the help.
- 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