How to build ATC Carousel in linuxcnc ?
- mhdsi
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
26 Oct 2016 04:17 #82072
by mhdsi
How to build ATC Carousel in linuxcnc ? was created by mhdsi
Hi everybody !
I have my DIY Gantry CNC Mill with Carousel tool
Spindle ATC Columbo Iso25 and BOB with DB25 (LPT)
Carousel with 10 tool and sensor index with B Axis
I can configure Step and it working but i want upgrade to ATC machine
Please guide me build it with linuxcnc
Thank you !
I have my DIY Gantry CNC Mill with Carousel tool
Spindle ATC Columbo Iso25 and BOB with DB25 (LPT)
Carousel with 10 tool and sensor index with B Axis
I can configure Step and it working but i want upgrade to ATC machine
Please guide me build it with linuxcnc
Thank you !
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23560
- Thank you received: 4858
26 Oct 2016 08:44 #82079
by andypugh
Replied by andypugh on topic How to build ATC Carousel in linuxcnc ?
You might find the HAL "carousel" component helpful:
linuxcnc.org/docs/2.7/html/man/man9/carousel.9.html
To see an example of how to use it you can open the LinuxCNC config-picker and look in the sample configs. Open sim/axis/vismach.vmc_toolchange/vmc_index to see a demo config. You can run it on your actual machain controller, it won't try to access any hardware. It has an animated 3D model of VMC to demonstrate it working.
It uses a line in the INI file to re-map the M6 command:
This calls the "toolchange.ngc" file (the other files mentioned are standard library files). The toolchange.ngc file is a G-code routine that controls the machine movements needed or the toolchange. Note that it is quite careful to make sure that it waits for confirmation before moving on, and makes a lot of use of the (abort, ) G-code "magic comment" to deal with problems.
You say that you have the carousel configured as a B-axis. You could keep it like that, an move it in G-code, or use the carousel component to control it.
If you keep it as a B-axis you will probably need to use the index switch as a home switch and add it to the home sequence. The B-axis will appear in the GUI, and you will be able to jog it. Which might actually be useful, though not terribly neat.
linuxcnc.org/docs/2.7/html/man/man9/carousel.9.html
To see an example of how to use it you can open the LinuxCNC config-picker and look in the sample configs. Open sim/axis/vismach.vmc_toolchange/vmc_index to see a demo config. You can run it on your actual machain controller, it won't try to access any hardware. It has an animated 3D model of VMC to demonstrate it working.
It uses a line in the INI file to re-map the M6 command:
[RS274NGC]
...
REMAP= M6 modalgroup=6 prolog=change_prolog ngc=toolchange epilog=change_epilog
This calls the "toolchange.ngc" file (the other files mentioned are standard library files). The toolchange.ngc file is a G-code routine that controls the machine movements needed or the toolchange. Note that it is quite careful to make sure that it waits for confirmation before moving on, and makes a lot of use of the (abort, ) G-code "magic comment" to deal with problems.
o<toolchange> sub
M19 R0 ;align the spindle
; only unload the tool if there is a tool in the spindle
; This assumes that the carousel is already aligned correctly.
; It is important to unload the tool before shutting down the machine.
O100 IF [#<tool_in_spindle> GT 0]
G53 G0 Z -100
M64 P2 ; move arm in
M66 P2 L3 Q5 ; wait for arm-in = true
O104 if [#5399 LT 0]
(abort, failed to move arm in)
O104 endif
M64 P3 ; release tool
M66 P3 L3 Q2 ; wait for tool-released = true
O105 if [#5399 LT 0]
(abort, failed to release tool)
O105 endif
O100 ENDIF
G53 G0 Z0
O200 IF [#<selected_tool> GT 0]
M65 P1 ; unlock carousel
M66 P1 L4 Q1 ; wait for locked=false
O106 if [#5399 LT 0]
(abort, failed to unlock carousel)
O106 endif
M68 E0 Q#<selected_pocket> ;set the carousel to move to the right pocket
M64 P0 ; start carousel
G4 P2
M66 P0 L3 Q60 ; wait for carousel finished
O107 if [#5399 LT 0]
(abort, failed to align carousel)
O107 endif
M65 P0; stop carousel
M64 P1 ; lock carousel
M66 P1 L3 Q1 ; wait for locked=true
O108 if [#5399 LT 0]
(abort, failed to lock carousel)
O108 endif
M64 P2 ; move arm in (might already be in)
M66 P2 L3 Q5 ; wait for arm-in = true
O109 if [#5399 LT 0]
(abort, failed to move arm in)
O109 endif
G53 G0 Z-100 ; pick up the tool
O200 ENDIF
M65 P3 ; clamp tool
M66 P3 L4 Q2 ; wait for tool-released = false
O110 if [#5399 LT 0]
(abort, failed to clamp tool)
O110 endif
M65 P2 ; move arm back out
M66 P4 L3 Q5 ; wait for arm-out = true
O111 if [#5399 LT 0]
(abort, failed to move arm in)
O111 endif
o<toolchange> endsub [1]
M2
You say that you have the carousel configured as a B-axis. You could keep it like that, an move it in G-code, or use the carousel component to control it.
If you keep it as a B-axis you will probably need to use the index switch as a home switch and add it to the home sequence. The B-axis will appear in the GUI, and you will be able to jog it. Which might actually be useful, though not terribly neat.
The following user(s) said Thank You: tivoi, Lcvette, mhdsi
Please Log in or Create an account to join the conversation.
- eneias_eringer
- Offline
- Junior Member
Less
More
- Posts: 35
- Thank you received: 7
26 Oct 2016 13:54 #82084
by eneias_eringer
Replied by eneias_eringer on topic How to build ATC Carousel in linuxcnc ?
Look at my!!!
I use subroutines like Andypugh post !!
I use subroutines like Andypugh post !!
Please Log in or Create an account to join the conversation.
- mhdsi
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
26 Oct 2016 16:36 #82093
by mhdsi
Replied by mhdsi on topic How to build ATC Carousel in linuxcnc ?
Thank Andypugh !
I can't config output port for Arm in/out, sensor Arm in/out, Carousel index, Tool released/clamp, sensor tool released/clamp
Thank you !
I can't config output port for Arm in/out, sensor Arm in/out, Carousel index, Tool released/clamp, sensor tool released/clamp
Thank you !
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23560
- Thank you received: 4858
26 Oct 2016 16:38 #82094
by andypugh
Replied by andypugh on topic How to build ATC Carousel in linuxcnc ?
The point is, it's G-code. You can set up any sequence you need.
Please Log in or Create an account to join the conversation.
- mhdsi
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
26 Oct 2016 16:38 - 26 Oct 2016 16:57 #82095
by mhdsi
I've seen it many times before
It is my expectation
Can you share your configuration?
Replied by mhdsi on topic How to build ATC Carousel in linuxcnc ?
Look at my!!!
I use subroutines like Andypugh post !!
I've seen it many times before
It is my expectation
Can you share your configuration?
Last edit: 26 Oct 2016 16:57 by mhdsi.
Please Log in or Create an account to join the conversation.
- mhdsi
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
26 Oct 2016 16:40 #82097
by mhdsi
Can you give me an example of that ?
Thank you !
Replied by mhdsi on topic How to build ATC Carousel in linuxcnc ?
The point is, it's G-code. You can set up any sequence you need.
Can you give me an example of that ?
Thank you !
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23560
- Thank you received: 4858
26 Oct 2016 16:44 #82098
by andypugh
The file posted earlier was an example. Without knowing anything at all about your machine it's hard to think of any useful second example.
Replied by andypugh on topic How to build ATC Carousel in linuxcnc ?
Can you give me an example of that ?
The file posted earlier was an example. Without knowing anything at all about your machine it's hard to think of any useful second example.
Please Log in or Create an account to join the conversation.
- mhdsi
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
26 Oct 2016 16:54 #82102
by mhdsi
Hi Andypugh
I can build M6 macro on Mach3
I understand all the process of tool changer, and understand your example
what I need's how to configure port because i can't config output port for Arm in/out, sensor Arm in/out, Carousel index, Tool released/clamp, sensor tool released/clamp
I use linux just days
Thank you !
Replied by mhdsi on topic How to build ATC Carousel in linuxcnc ?
Can you give me an example of that ?
The file posted earlier was an example. Without knowing anything at all about your machine it's hard to think of any useful second example.
Hi Andypugh
I can build M6 macro on Mach3
I understand all the process of tool changer, and understand your example
what I need's how to configure port because i can't config output port for Arm in/out, sensor Arm in/out, Carousel index, Tool released/clamp, sensor tool released/clamp
I use linux just days
Thank you !
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23560
- Thank you received: 4858
26 Oct 2016 17:05 #82103
by andypugh
Those are using G-code digital inputs ans ouputs:
linuxcnc.org/docs/2.7/html/gcode/m-code.html#mcode:m62-m65
Those are connected to hardware by one of the HAL files in the config. If you ran the demo then you will now have all the files in your ~/linuxcnc/configs folder, but the HAL file for the changer looks like this:
github.com/LinuxCNC/linuxcnc/blob/master...toolchange_index.hal
If you are using a B-axis then you will have more G-code and less HAL to control things.
Replied by andypugh on topic How to build ATC Carousel in linuxcnc ?
what I need's how to configure port because i can't config output port for Arm in/out, sensor Arm in/out, Carousel index, Tool released/clamp, sensor tool released/clamp
Those are using G-code digital inputs ans ouputs:
linuxcnc.org/docs/2.7/html/gcode/m-code.html#mcode:m62-m65
Those are connected to hardware by one of the HAL files in the config. If you ran the demo then you will now have all the files in your ~/linuxcnc/configs folder, but the HAL file for the changer looks like this:
github.com/LinuxCNC/linuxcnc/blob/master...toolchange_index.hal
If you are using a B-axis then you will have more G-code and less HAL to control things.
The following user(s) said Thank You: mhdsi
Please Log in or Create an account to join the conversation.
Time to create page: 0.089 seconds