Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: pjchick on January 10, 2011, 08:50:33 AM

Title: Two heads
Post by: pjchick on January 10, 2011, 08:50:33 AM
Hello all
I'm currently building my first CNC router and am planning on using Mach3 to control it. My design is a moving gantry style, however with abit of a twist.

I'm planning on mounting two 'machining heads' onto the Y Gantry. The first head will have my router, the second will probably have a laser diode for burning/etching. Both heads will have separate Y and Z axis steppers but they will share the same X axis.

When 'head A' is in use, 'head B' is parked at one end of the Y gantry out of the working envelope. When I want to tool change I would like to park 'head A' at the other end of the Y gantry (again out of the working envelope) then bring in 'head B' to continue.

So I would need to control 1 X-axis, 2 Y-axis and 2 Z-axis.

Could such an arrangement be possible to control with Mach 3?

Regards

Peter
Title: Re: Two heads
Post by: Hood on January 10, 2011, 09:14:30 AM
Yes its possible, two ways to do it.
One is have your code call X Y and Z commands for one and X A and B for the other.
The other option would be to use the swap Axis feature in Mach so that when you use it the Y and A pins will swap and Z and B will swap. That will mean you will still be able to use Y and Z commands. Problem you would have is you would have to make sure you reference each axis before and after you swap or you could end up in trouble. Well its not really a problem but just more that you would have to make sure you did it.

For both you would either need to take the offset into account in your code or use fixture offsets.

Hood
Title: Re: Two heads
Post by: ASC on January 10, 2011, 09:41:33 AM
If it was up to me I would have both heads mounted on a single tooling plate with some kind of actuator to move them into the work envelope.  But hey, if you can afford another ball screw why not!

I'd probably set it up using seperate XML files for each head and switch the Y and Z pin assignments with A and B as hood suggested.  Maybe have a script or macropump to park the secondary head in a safe zone when the primary head is active.

Whatever happens this sounds like a really unique machine and can't wait to see it in action!
Title: Re: Two heads
Post by: ger21 on January 10, 2011, 10:50:47 AM
Yes its possible, two ways to do it.
One is have your code call X Y and Z commands for one and X A and B for the other.
The other option would be to use the swap Axis feature in Mach so that when you use it the Y and A pins will swap and Z and B will swap. That will mean you will still be able to use Y and Z commands. Problem you would have is you would have to make sure you reference each axis before and after you swap or you could end up in trouble. Well its not really a problem but just more that you would have to make sure you did it.

For both you would either need to take the offset into account in your code or use fixture offsets.

Hood

According to the Wiki, you can't swap two pairs of axis. Only one Swapaxis() can be in effect at a time.
Title: Re: Two heads
Post by: Dan13 on January 10, 2011, 01:46:23 PM
This is correct, Gerry. At least with the Smooth Stepper it is. Unless you do ResetAxisSwap() after a SwapAxis() using another SwapAxis() wouldn't work.

Hood's first suggestion seems to be the only way. Of course you can also go to the Ports and Pins and swap the pins manually as well.

Dan
Title: Re: Two heads
Post by: Hood on January 10, 2011, 04:24:37 PM
Ah yes forgot about that.
Hood
Title: Re: Two heads
Post by: pjchick on January 10, 2011, 04:36:10 PM
I was thinking about switching the step/dir signals at the breakout board. When I want to change head my tool change macro would park headA then switch a logic output. This logic output from the parallel port would control some transistor switch logic that would then divert the step/dir signals to headB. The macro would then move headB to the correct position to resume the job.

Does that sound feesable?
Title: Re: Two heads
Post by: Hood on January 10, 2011, 05:00:14 PM
I am sure Simpson did something like that for his rotary axis, I will have a look and see if I can find it.
Hood
Title: Re: Two heads
Post by: Hood on January 10, 2011, 05:04:01 PM
Ok heres the thread is talked about, might need to read some before or some after this actual post for full info.
http://www.machsupport.com/forum/index.php/topic,11422.msg99637.html#msg99637

Hood
Title: Re: Two heads
Post by: Dan13 on January 11, 2011, 01:42:11 AM
Right Hood. Steve did this with an external board which receives a signal from Mach and swaps the pins of two axes. Using two of this boards should do what's asked for. He was intending to be selling them, so may be contact him and ask.

Dan