for my specific use case I think I would like to use the home switch to be able to home to the center of a pin that is inline with the pocket center (kind of like probing ridge center) and then use a preset amount of step counts per pocket based on the number of pockets in the carousel to divide it into that many moves for a full revolution of the platter. I am using a 2 pin geneva wheel so 1/2 rotation is one pocket. I would like to confine all of the hal into one file if possible to make implementation as easy as possible and have some options to be able to use the index method as well. kind of a one setup page allows all types and each type has a unique hal file that can be called from the ini. make it as modular and easy to use/setup as possible. ATC seems to be one of those things that scares most folks because of its complexity. I think having it made easier would be a good thing.
A word of caution on using a pin for homing...
When I first built my ATC, I used stainless pins with proximity sensors for both home and pocket flags. After struggling with pocket alignment, I finally realized that round pins weren't really suitable as flags. At least not with the geometry I used, where the pin was vertical (up from the platter) and the proxy was pointed at the pin circumference.
When the round pin went past the proxy, the slight variation in sensing distance (due to pin radius) was magnified further out at the pockets. Result was inconsistent pocket alignment. And slight changes in rotational speed made a huge difference in pocket alignment consistency.
I wound up ditching the pins and proxys and installed some optical fork sensors with 3D printed flags. Despite the circular motion, since the flags have straight edges they trigger the sensors MUCH more consistently - and at any speed.
Regarding your plans for incorporating a GUI-based ATC config, I quite like that idea. But I think you might consider just sticking with INDEX mode for carousel, and not trying to offer both INDEX and COUNTS modes.
In your case, you don't need to specify a preset number of step counts if you're using INDEX mode. In that mode, carousel.comp uses a velocity-mode stepgen and the motor is 'dumb'. Carousel just looks for the pocket sensor and stops rotating the motor (and does a second fine-alignment if you've opted for that feature).
For a geneva wheel, a slight motor overshoot is a non-issue, and because carousel.comp is using per-pocket sensors, there's no cumulative error stacking up over multiple pockets.
On a direct-drive (with or without reducer) ATC like mine, overshoot is a problem... but the fine-alignment feature takes care of that. Again, no cumulative error.
For a slightly more complicated mechanical & electrical installation (need pocket sensors), it's much easier than COUNTS mode to configure. And potentially more reliable, especially if someone chooses to use an open-loop stepper.
An open loop stepper in INDEX mode is fine - if the motor stalls, carousel.comp won't set the 'ready' pin high and a macro waiting for that pin will time out and throw an error. In COUNTS mode, neither carousel.comp or LCNC have any idea that the open-loop stepper stalled and will probably crash the ATC.
I think you'll find that regardless of what kind of ATC a potential Probe Basic user has - or is building - if you simply set some ground rules it'd be easier for you and the end users in the long run:
- MOTORS
- On/off controled AC or DC motor, or
- Step/dir stepper or servo
- ATC Mechanism
- Direct drive (reducer, belt, or direct-to-motor)
- Geneva wheel
- Worm drive (?)
- ATC Sensors
- One home sensor
- One per-pocket sensor
- ATC Movement
- One retract sensor
- One forward sensor
- One retract output (valve or motor or something)
- One forward output
- Drawbar
- One drawbar engaged sensor
- One drawbar output
Maybe something like that as a baseline config?