'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       where = GetABSPosition(3)      where1 = where + 20      Message ("Axis home switch triggered - moving off to " & where1)         code "G0 A"  &where1     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)Message ("                                                     ")End             