How to build ATC Carousel in linuxcnc ?
It can also be done with M6 remap, but i would not use remap.
Does the tool changer have any position sensors? Having an index and another sensor for counting the positions would make it very nice for the carousel comp.
0x2102 wrote: It's vertical 2 by X Tool Changer. So, for example 24 tools in total: tools 1 - 12 on the left side and tools 13 - 24 on the right.
Still trying to figure out what the best approach would be accomplish this type of tool changer.
The "carousel" HAL component already does what you need for this application:
pin in signed pocket-number """The pocket to move to when the .enable pin goes high. If the value passed is gigher than the number of pockests specified in the "pockets" modparam then modulo arithmetic is used. This is intended to allow the use of multiple tools in the same holder, as is sometimes useful with lathes.""";
So 2 and 14 would both position the carousel in the same place. Then the tool0change logic needs to decide what axis moves are needed, ie left or right of the tool changer.
0x2102 wrote: I am still thinking about how to index/position it. Right now I would say 5 proximity sensors (1 index / 4 binary or gray code) to identify position of the carousel.
That's definitely the way that I would recommend. There are other possibilities but I think Gray code + strobe is definitely the most dependable. Add another sensor for parity, if you want to be super-confident. (Then if any single sensor fails an error will be triggered)
also if I have a "home" switch on my carousel, will that get connected to the carousel.N.ready pin?
still try to understand how to use it
thanks for your help
(I have configured a couple of machines to use it, but none were my own and I don't have the configs)
What does the "home" pin on your carousel indicate?
In many cases it will connect to sense-0 and be the pocket-1 indicator.
rogerxue wrote: For example, I see the signal car-enable gets created, but nowhere does it get used,
Where are you looking?
net car-enable motion.digital-out-00 carousel.0.enable
That is linking the signal to the carousel enable, and to a G-code digital output.
rogerxue wrote: my bad, I was looking at a older verison.
Yes, even if you are using LinuxCNC 2.7 you probably want to install the 2.8 version of "carousel".
So if I decide to use stepgen to drive stepper, then
carousel.N.fwd-dc should be net to stepgen.<chan>.velocity-cmd?
Close, except that fwd-dc is an input that tells the component how fast to move in fwd. the actual output to the stepgen is the pin carousel.0.motor-vel
You would need to setp the dc pins to suitable fixed speeds.
net motor-speed carousel.0.motor-vel stepgen.11.velocity-cmd setp carousel.0.fwd-dc 100 setp carousel.0.rev-dc 100 setp carousel.0.hold-dc 0