'M950.m1s 06/01/09 ©2009 www.theCUBEstudio.com 'Macro to swap 4th axis back to A and re-home 'use after M940 to restore 4th axis to A axis 'Waits until axis stops moving before reset 'Moves axis 20 degrees if home switch is active 'Re-homes A axis 'Resets machine A to zero While ismoving() sleep 100 Wend resetaxisswap() 'CHECK IF A AXIS HOME SWITCH IS TRIGGERED If getLED(39) Then here = GetABSPosition(3) here1 = here + 20 Message ("Axis home switch triggered - moving off to " & here1) code "G0 A" & here1 While ismoving() sleep 100 Wend End If 'RE_HOME A AXIS DoOemButton(1025) While ismoving() sleep 100 Wend 'RESET A AXIS TO MACH ZERO SetMachZero(3) End