How to build ATC Carousel in linuxcnc ?

More
6 years 9 months ago #154848 by rogerxue
thanks, are you suggesting I have a secondary controller for carousel, and only expose a feedback of which tool it is at? I can definitely do that, but I think it would be more flexible to control the movement of the carousel directly from linuxcnc. e.g. if I want to move tool to 1, I'll execute gcode like g0 b1. but I also don't want to expose b as an axis in the UI

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

More
6 years 9 months ago - 6 years 9 months ago #154850 by andypugh
When your G-code says "T6" then the value "10" appears on the hal pin iocontrol.0.tool-prep-pocket:

linuxcnc.org/docs/2.7/html/man/man1/iocontrol.1.html

If you link that HAL pin to the caarousel component and connect a motor of some sort to the output pins of the carousel component then the carousel will move to that pocket number.

You typically need a G-code routine to move the axes in such a way as to perform the sequence, but at least the carousel comp can be used to position the tools.

Start LinuxCNC and then go to the virtual config sim/axis/vismach/vmc-toolchange for a demo config using corousel and a G-code subroutine.
Last edit: 6 years 9 months ago by andypugh.

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

More
6 years 9 months ago #155069 by rogerxue
This is very helpful, thanks.

I think I'll setup in the following way:
- make the axis B as carousel stepper
- override the M6 command so that it will figure out which tool it try to move to and issue command like G0 B3 to move pocket to position 3
- more spindle movement and drawer bar command to pick up the tool

now, that will make carousel as a standard axis in the UI right? Is there anyway I can hide it as a regular axis from UI?

thanks

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

More
6 years 9 months ago #155079 by andypugh
Don't configure the toolchanger as an axis. It's not really the right way to do it.

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

More
6 years 9 months ago #155536 by james891
Hi Andy,

I'm following your carousel setup, I have a stepper to go into position for my ATC that is not set up as an axis. I also dont have an encoder set up(just home) for this stepper. Is it still possible to use the component?

If not, how can I drive the stepper fast from my gcode? I'm looping this but the dwell does not seem to go small enough, my stepper is still slow,no matter how low I go:
M64 P0;ON
G4 P0.00002
M65 P0;OFF
G4 P0.00001

Thanks

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

More
6 years 9 months ago #155647 by andypugh
You can drive the stepper by putting the step-generator in velocity mode.
The newer version of the carousel component::
linuxcnc.org/docs/2.8/html/man/man9/carousel.9.html
has an output pin "motor-vel" which, when connected to the stepgen velocity command pin will control the motor at a speed governed by fwd-dc and rev-dc.
(acceleration can be configured as a stepgen parameter)
But, carousel needs _some_ way to know which tool is in place. You could potentially calculate this from actual stepgen steps in HAL. Do you have any spare IO pins?
The following user(s) said Thank You: james891

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

Time to create page: 0.259 seconds
Powered by Kunena Forum