16 Pocket tool changer with PB and carousel.comp (Working config for reference)

More
3 years 5 months ago #272622 by spumco
Well, I'm now educated... I thought those sensors were expensive, but $8 from Amazon was too good to pass up.

Thanks for the tips.  Once the sensor gets here I'll hook it up and start playing with your config.

 

Please Log in or Create an account to join the conversation.

More
3 years 4 months ago #273716 by Lcvette
I am curious on the carousel comp on how it physically wants the motor connected, does it have to use an axis output or is it using gpio pins?

Please Log in or Create an account to join the conversation.

More
3 years 4 months ago #273746 by spumco
@Lcvette-

Carousel doesn't create a joint or axis in the normal sense.  It might help to think of a carousel-controlled motor as a rotary axis outside the normal framework, which is commandable via gcode (using motion.analog-out and digital-in/out), but which is not synchronized to the other axes.

If using carousel in counts mode, it is physically connected like a step/dir axis.
If using one of the other modes, it uses gpio to turn on/off a 'dumb' motor.  Your 3-phase induction motor with relays (or digital IO to the vfd) would be an example of using a non-counts mode.

For a 'counts' (stepgen) version of carousel my basic architecture looks like this:
  • stepgen physical pins connected to Mesa step/dir output
    • could be parallel port, or other pins fast enough for your particular system
  • stepgen (software or Mesa in my case) set up in hal
    • Usual stepgen settings in INI file (scale, accel, velocities, type) like an axis
  • stepgen input connected to carousel output
    • stepgen.N.counts <= carousel.N.counts
    • stepgen.N.position-command <= carousel.N.counts-target
  • desired pocket number command via gcode
    • carousel.N.pocket-number <= motion.analog-out-NN
  • carousel position, homing, and other feedback connected via gpio
    • Counts mode only requires a single index pin - no per-pocket sensor required
For one of the other carousel modes (grey, binary, bcd, etc) the ATC requires an encoder of some sort depending on the mode selected.
  • Encoder can be complicated or simple
    • "Index" mode requires a home (index) sensor as well as a per-pocket sensor
    • I've seen at least one example on the forum of a BCD encoder which uses four proxys and a four-track series of holes drilled in the ATC platter to create an absolute encoder for carousel
  • Carousel uses the encoder feedback to turn on/off gpio outputs to the motor at the appropriate time
  • Fine alignment, both for homing or pocket-to-spindle, can be adjusted in carousel settings
    • carousel.N.home-offset
    • carousel.N.align-dc (and other related settings)

Beyond that, commanding carousel is virtually identical to what you cooked up in Probe Basic... except the M10/M11/M12 subroutines are no longer necessary.  Instead of doing the destination pocket math in the subroutine, carousel handles distant & shortest-path and reports back to LCNC (via carousel.N.current-position) when the target position is reached.

In my config, I connect the "P" parameter (passed to M10) to carousel instead of passing it on to M11/M12.
Code:
;***Rotate ATC*** M68 E0 Q#<P>                            ; Set carousel destination pocket M64 P0                                  ; Rotate carousel to selected-pocket G4 P0.5                                 ; Pause required before M66 check M66 P0 L3 Q10                           ; Wait for carousel finished                                         ; Stop motor O120 if [#5399 LT 0]     (abort, failed to align carousel) O120 endif M65 P0

So all the math & motor enable/disable is done inside carousel.

Does this help?
The following user(s) said Thank You: TurBoss, RIDO_JIMO

Please Log in or Create an account to join the conversation.

More
3 years 4 months ago #273747 by spumco
clarification for above:

M68 E0 - motion.digital-out (carousel destination pocket number)
M64 P0 - carousel enable
M66 P0 - carousel.N.ready (in position)
M65 P0 - carousel disable

Please Log in or Create an account to join the conversation.

More
3 years 4 months ago #273750 by Lcvette
yes, more than what i was expecting in an answer..lol  very interesting for certain!  I was putting a atc together for a smaller machine and was considering using a stepper motor with a dumb step generator but also considered using the carousel component, was just curious if the stepper drive connections were gpio or to axis step gen output.  was fuzzy on that. but you cleared it up! thank you!

Please Log in or Create an account to join the conversation.

More
3 years 4 months ago #273762 by spumco
No problem, you've helped me out so much over the past couple of years.

Side note on steppers with ATC's...  If you're using a geneva drive with a stepper & carousel.comp, no problem.  The encoding scheme required by all the modes will ensure the pockets are aligned or carousel will never output a 'ready' signal to the M68 safety check.

But I'd be very reluctant to use an open-loop stepper + reducer in counts mode.  There's no feedback to carousel that the ATC rotated properly if you are only using the index pin to home (and no other sensors).  Lost steps would be bad here... which is why my closed-loop stepper alarm-out is tied to LCNC's estop.
The following user(s) said Thank You: Lcvette

Please Log in or Create an account to join the conversation.

Moderators: KCJ, Lcvette
Time to create page: 0.207 seconds
Powered by Kunena Forum