Are you still in the building/fiddling phase of your ATC, or have you tried it out yet in meat-space?
Reason I ask is that carousel.comp will automatically home the carousel to position-1 the first time it's enabled (
when carousel.comp is in INDEX or COUNTS mode).
So unless there's another reason (see below), you can just run your first tool change and it'll take slightly longer. Carousel will home, then go to the commanded pocket, and
then set carousel.N.ready HIGH so that your toolchange macro sequence can use the 'ready' signal to make the next move (whatever that is in your tool change choreography).
If you really want it to home during the axis homing sequence, we'll have to cook up a connection scheme using something like halui and a user M-code.
Mine looks like this in hal:
Code:
setp oneshot.1.width 1
net HOMED-ALL <= motion.is-all-homed
net HOMED-ALL => oneshot.1.in
net HOMED-ALL-TRIG <= oneshot.1.out
net HOMED-ALL-TRIG => or2.10.in0
net BTN-HOME-ATC => or2.10.in1
net HOME-ATC <= or2.10.out
net HOME-ATC => halui.mdi-command-02
And the mdi-command-02 calls M13.
M13 is mapped to m13.ncg, which sets the carousel destination pocket to 1 (M68), then carousel enable (M64), then checks for carousel ready (M66), then disables (M65).
The above results in the ATC homing immediately after all the axes are homed, or I press a button because I want to fiddle with the ATC and I need it to home without screwing around homing the whole mill.
There's other stuff in M13, but the only reason I don't just let carousel do it's thing automatically is that I'm using the Probe Basic GUI... and the on-screen ATC animation is controlled through some secret-code gibberish contained in the M13 macro. It's all there to keep the screen dingus synchronized with the meat-space ATC.