``` o sub ; Move tool carousel CCW until ATC zero ; ; Parameter #5170 is used to track the current tool pocket (persistently) (print, o P#

) M65 P10 (set atc widget unhomed) M64 P11 (show atc widget referencing msg) M64 P3 ; Move Motor FWD M66 P3 L1 Q10 O120 if [#5399 LT 0] (abort, failed to home carousel) M65 P3; stop motor O120 endif #5170 = 1 M65 P3 ; Stop motor M65 P11 (hide atc widget referencing msg) M64 P10 (set atc widget homed) #5171 = 1 m61 q#5210 O130 if [#5171 EQ 1] M14 O130 endif o endsub [1] M2