Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: kencor1 on August 20, 2011, 11:02:01 AM

Title: Could this be done with Mach
Post by: kencor1 on August 20, 2011, 11:02:01 AM
I am thinking about trying to build a Wood Lathe controlled by Mach. But I would need 2 cutters that are about 1.5 inches spaced apart following the same z axis but the 2 X axis would happen at different times. The 1st cutter would be a roughing cutter and would leave approx. .25 from the final dia. the other cutter is a finish knife that will take it down to the finish dia. They would both be tied to the same Z axis. This is how one of the commercially made lathes are. I have racked my brain but I don't think that Mach can do this. Can anyone think of a way that this might be done

Thanks,
Tom

Here is a link to a video of a commercial machine doing what I am trying to accomplish
http://www.youtube.com/watch?v=eEt6dFmcZYU
Title: Re: Could this be done with Mach
Post by: budman68 on August 20, 2011, 11:38:59 AM
Hi Tom,

I have no idea if Mach can do this, but I'm just curious looking at the video, isn't there actually 3 cutters?

One to turn the blank to a given diameter, then the rough and then the finish knives?

Dave
Title: Re: Could this be done with Mach
Post by: DaOne on August 20, 2011, 12:10:18 PM
Yes this can be done with Mach. It is simply a 3 axis machine. You will not be able to show the correct toolpath simulation in Mach however. The way I would set it up depends on the post processor that you intend to be using. A simple way would be a simple 2 axis lathe setup with X as the rougher and A as the finisher. If you having an issue wrapping your head around this just think about 3D ball milling on a 3 axis mill. All 3 axises are driven simultaneously. Where it become complicated is in creating the G-code.
Title: Re: Could this be done with Mach
Post by: kencor1 on August 20, 2011, 12:18:15 PM
Dave, yes the video shows a pre-rounding cutter. I would not need to use a pre-rough cutter because my turnings would have square and turned areas.

DaOne - do you have any ideas on how the g-code would be created? Or what the code would even look like?

Thanks,
Tom
Title: Re: Could this be done with Mach
Post by: DaOne on August 20, 2011, 12:25:48 PM
Well since your Z is always the same on both tools you need to figure out the time it takes between the tools to be in the same spot to start using the finishing axis (A) and the give it the commands with X. It basically just a simple delay based on the feed rate of Z. You can always post out the roughing... then the finishing. Figure out timing point (offset) to graft them together. Like I say the G-code is the issue not Mach. Mach with just do what its told.
Title: Re: Could this be done with Mach
Post by: kencor1 on August 20, 2011, 12:44:44 PM
Thanks DaOne, do you have any suggestions on how I would set up a post, or how I would "graft" the tool paths together, would I have to manually do it? Lets say the delay is 1 second between tools.

Tom
Title: Re: Could this be done with Mach
Post by: DaOne on August 20, 2011, 12:56:22 PM
I wish I could. Its all about math and will probably take some trial and error to get it just right. If It was me I think a single cutter (each axis would have its own pass) would be much easier to use. I would just do it in 2 passes. I am not familiar with wood lathe cam packages to recommend anything. 

Wes
Title: Re: Could this be done with Mach
Post by: BR549 on August 20, 2011, 01:42:36 PM
HUM I don't see that happening with mach3.  The problem is running two independant axis's in sync with z to do the 2 profiles at the same time.

I don't see any way to Gcode that with Mach3.  Could be wrong though(;-)

What I would do is do a standard lathe setup with a tool changer and multiple passes.

(;-) TP
Title: Re: Could this be done with Mach
Post by: kencor1 on August 20, 2011, 01:45:44 PM
Thanks for the replys, the problem with running 2 tool paths is that with a wood lathe the work piece has to run through a steady rest, so after the 1st cut there will be no stock left on the work piece to be supported by the steady rest and the finish pass will produce a lot of chatter and the finished work will need way too much sanding. Hopefully someone else may have am idea on how to make this work.

Tom
Title: Re: Could this be done with Mach
Post by: BR549 on August 20, 2011, 02:35:16 PM
That is WHY they used a rigid precutter in the vid it serves 2 purposes prerounds the square  AND helps support the work(;-)

Let us know what you find, (;-) TP
Title: Re: Could this be done with Mach
Post by: DaOne on August 20, 2011, 02:37:51 PM
I think BR549 is right. I just did some tests myself and one of the 2 axises will always be incorrect. I guess maybe Mach cant do it???
Title: Re: Could this be done with Mach
Post by: BR549 on August 20, 2011, 02:53:58 PM
You MIGHT could do it with 2 versions of mach running independantly of each other and some FANCY plugin work.  I would give Scott S a call and discuss it with him.

(;-) TP

Title: Re: Could this be done with Mach
Post by: stirling on August 20, 2011, 05:02:28 PM
Sure you can do this with Mach. As DaOne said before he lost faith, this is only a three axis job, you just need to bend your mind a bit to see it.

Let's forget the "pre-trimmer" - this is just a dumb tool dragged along by the X axis. Also forget the fact that the stock is spinning - that's of no interest to Mach.

So, that leaves us with the X axis with the 2 tools attached. The first tool is the Y axis and the second tool is the Z axis. To help see this, in your mind just rotate the second tool round the X axis by 90 degrees.

Now the real mind bender. Imagine a toolpath for the Y axis - it's just a profile of the job but so is the Z axis but staggered to the left and rotated by 90 degrees so standard CAM can handle it. Then you generate an engraving path. I used Rhino for the pic attached. It's supposed to be a baseball bat - hey give me a break it's not bad and it's late and the beers are doing just fine.  ;D

Cheers

Ian
Title: Re: Could this be done with Mach
Post by: ger21 on August 20, 2011, 05:51:49 PM
What you need is some custom CAM software.
It looks to me like you have X, Y, and Z, with Y and Z the tools, like Stirling said.
What I'd do, is draw my roughing and finishing paths in AutoCAD, and choose an X axis resolution, maybe .002-.005", maybe bigger?
Then parse through the paths, and put the Y and Z values into arrays.
Then, for X = 1 to however many steps needed,
Y= Y(X)
Z = Z(X- tool spacing)

So you'd end up with a series of X,Y,Z moves, with X incrementing  by the chosen resolution amount for each line of g-code.

Seems like it should work.
Title: Re: Could this be done with Mach
Post by: kencor1 on August 20, 2011, 08:56:06 PM
Thanks guys for the help. Ian, could you post what the g-code wold look like for that drawing? Gerry, I am sort of following what you are saying but I am not sure what you mean by " parse through the paths, and put the Y and Z values into arrays.".  But it seems to me that even with the 3 axis's I don't understand how the y and z moves can happen at different points along the x axis. I am trying to figure out what the g-code would even look like. Do you think you could do a couple lines of code showing how it would be.

Thanks again for the help
Tom
Title: Re: Could this be done with Mach
Post by: DaOne on August 20, 2011, 09:15:47 PM
Ok, it looks like it will work. You just need to be sure your X and A axises are fast enough to keep up with the feed of Z. Just like I said before its all about timing the 2nd tool (whatever the offset between them and the feed rate). Programming this by hand will become a mind bender for sure. Its just like 3 axis 3D profiling. That you just don't do by hand as well.
Title: Re: Could this be done with Mach
Post by: DaOne on August 20, 2011, 09:20:32 PM
I don't understand how the y and z moves can happen at different points along the x axis. I am trying to figure out what the g-code would even look like.

They move at the same time when they are on the same line...

G1 Z-.001 X2. A2.
G1 Z-.002 X1.9 A1.95


Basically lots and lots of lines.... The higher the resolution = more lines of code.

You need to figure out when to start feeding A into the part based upon where X is.
Title: Re: Could this be done with Mach
Post by: BR549 on August 20, 2011, 09:20:39 PM
Actually without the pretrimmer you would just break up a bunch of wood. Its main purpose is as the steady rest to support the wood. BUT it is not a programmable feature.

I have seen these CNC copy lathes run before but never really studied them as to controller function.

I am all good for learning something new(;-)

Lets get the axis convention straight, I see it as a lathe    Z/X and U where U is the second X axis ??

(;-) TP



Title: Re: Could this be done with Mach
Post by: DaOne on August 20, 2011, 09:26:19 PM
Sure you can do this with Mach. As DaOne said before he lost faith, this is only a three axis job, you just need to bend your mind a bit to see it.

Yes I simulated it and opened my mouth a bit too fast. :) Its actually quite simple when you look at it. Just lots of detailed feeds... one line at a time. (same as doing 3D profiling) Whatever your resolution is will determine just how big the file is gonna get. Your fingers will become quite sore without some kind of cam software. Will most likely require a custom post as well.
Title: Re: Could this be done with Mach
Post by: DaOne on August 20, 2011, 09:29:45 PM
Quote
Lets get the axis convention straight, I see it as a lathe with live axis   Z/X and U where U is the second X axis ??

You can set it to any letter you want. I went with "A" because there are lathe screen sets out there with a "A" DRO. All my live tools are B & C axis on the big boys. The only thing that will matter what letter it is will be the post you use. That can be easily edited in most CAM software.
Title: Re: Could this be done with Mach
Post by: BR549 on August 20, 2011, 09:40:49 PM
There has to be a reason they are running offset cuts on the same plane . Can you Cut if the bits are at the same point of cut on Z but staggered 90degs.?

OK I cheated and made a phone call(;-).

NOW I see said the blind man.

(;-) TP

Title: Re: Could this be done with Mach
Post by: kencor1 on August 20, 2011, 10:02:35 PM
I also am starting to see the light.  So I would somehow need to modify my post processor to make this happen. That is where I will come to a screeching halt. I can stumble around in the post config files but this is probably beyond my capabilities. If there is anyone willing to help me with this let me know. I have Mastercam X2, Bobcad 23 & 24, also Vectric Aspire.

Thanks
Tom
Title: Re: Could this be done with Mach
Post by: stirling on August 21, 2011, 07:50:20 AM
No need for anything special. Mach3 Mill, CAD/CAM for 3 axis and 3 axis Mach Mill POST. If you try what I suggested, although in CAD and CAM (and Mach) you'll see a rather weird toolpath because it'll be in our Earthling view of 3D it'll cut just fine on a machine exactly as in the vid which is PHYSICALLY in a different universe of TWO 2D planes that share X. Try it - I just did with my standard POST and it works just fine. Here's the very rough and ready code. The Z is the roughing tool and the Y the finishing.

Ian
Title: Re: Could this be done with Mach
Post by: kencor1 on August 21, 2011, 09:26:14 AM
Ian, that is it. Now my next question is how did you combine the 2 tool path drawings into 1. I understand rotating 90 degrees but I cant figure out how you combined them. Could you post a dxf of the combined drawing.

Thank you again,
Tom
Title: Re: Could this be done with Mach
Post by: BR549 on August 21, 2011, 12:04:00 PM
IAN you are the MAN, DAONE, you just needed a push(;-)

I had to make a phone call to someone who works on one(;-) Cheated as they say.

Seems there are 3 basic versions of these critters.

1 uses a Controller that can handle 2 planners ( very expensive. But the smoothest runningand  best quality cuts as you could easily program Arcs and lines)

1 uses a follower axis in realtime that is geared to the long axis and followes a lift table based on the long axis position. (complicated)

1 uses a standard controller and does segmented code. ( Not as smooth running , his words not mine)
THE BEST ONE he said was not even CNC it is the old hyd follower machine that used a profile plate. BUT it could not do fine detail work as well as the CNC version. you were limited by the roller follower radius.


The way they did the 3rd option Gcode was use a standard lathe CAM and draw the 2 paths on different layers and post them as 2 passes.  then he loads the Gcode in  Excell takes the second toolpass and copies  the profile axis column to a new column and moves it down to match the same offset amount as the 2 tools are offset.  He said that  a precise match up with both profiles is not essential as you are taking a rather large cut each time. Just get it close.

He also said the Cam manf wanted a small fortune to do a special post so this is what they use now.

The machines with auto loader run 24/7 only stopping for tool changes or  breaks down.

 Learn something new every day, (;-) TP 
Title: Re: Could this be done with Mach
Post by: stirling on August 21, 2011, 01:20:00 PM
Tom, files attached. Basically it's vector addition which you can do in a variety of ways but one way is to extrude each curve into a surface. Where the two surfaces intersect, there's the 3D toolpath. I guess it depends on whether you can do this in your CAD but you should be able to do it one way or another.

Terry, Re: the Excel idea, it's seductively simple but it's limited for the reasons you say. The problem arises because the two sets of X values can't easilly be made to match or synch. My way the two paths can be quite different - i.e. the finishing path can have more detail if you like and yet even though the paths are different they're allways EXACTLY in synch.

Ian
Title: Re: Could this be done with Mach
Post by: spunk on August 21, 2011, 02:05:31 PM

The way they did the 3rd option Gcode was use a standard lathe CAM and draw the 2 paths on different layers and post them as 2 passes.  then he loads the Gcode in  Excell takes the second toolpass and copies  the profile axis column to a new column and moves it down to match the same offset amount as the 2 tools are offset.  He said that  a precise match up with both profiles is not essential as you are taking a rather large cut each time. Just get it close.

He also said the Cam manf wanted a small fortune to do a special post so this is what they use now.

The machines with auto loader run 24/7 only stopping for tool changes or  breaks down.

 Learn something new every day, (;-) TP 


IT's as easy as that and it could easily be made into a VB program in Excell...
ment to write something like this but then saw someone beat me to it ;-)

Cheers

Title: Re: Could this be done with Mach
Post by: kencor1 on August 21, 2011, 03:25:29 PM
I started playing with outputting 2 tool paths and taking them into excel, when I paste the code together in the same file it looks to me that the "roughing tool path" at some point along the x axis will be using a G1 move but the Finish Tool path may have a G2 or G3. Can a single line of code have both a G1 and a G3 on the same line? I would think not.

I am thinking it my be easier to run the Finish tool path on a different computer at the same time. That leads me to my next question. Is there a way that I can have one session mach enable an output at a specific X axis DRO and have it start the program on the other session of Mach when that DRO is reached?

This project may be a little over my head so I may have to give up on it, but I hope not. I would not be opposed to paying someone to help figure it out.

Thanks for all of the advice so far.

Tom
Title: Re: Could this be done with Mach
Post by: stirling on August 21, 2011, 04:17:28 PM
Spunk - I've explained why this is NOT a good option.

Tom - I'm amazed at your last reponse.

Both. I guess I've wasted my time.

Ian
Title: Re: Could this be done with Mach
Post by: BR549 on August 21, 2011, 05:18:55 PM
Ian you get no argument out of ME on this one(;-) I see where you are going with it. Can it be made to account for a tool offset like is on the machine in the VID??  That seems to be the standard approach to tooling on these things . Jonn said the offset was best for cutting. If you get the tools to close together the wood would tend to chunk out now and then. I don't know enough about wood turning to say one way or the other.

Tom on the 3rd option it is NOT done with arcs it is all micro segmented code ALL lines that make up arcs so there is never the arc problem. Probably why John said it was not as smooth running .


Just a thought, (;-) TP



Title: Re: Could this be done with Mach
Post by: kencor1 on August 21, 2011, 05:50:54 PM
Ian, I am glad that you can figure it out, but unless you are willing to give step by step instructions, I don't feel as if I can accomplish this. For you to say that I wasted your time is not fair. You gave an explanation that you fully understand, but that doesn't mean that everyone has the same skill set as you. This was something that I wanted to look into so I asked a question and got answers. For that I am greatfull.  Would you rather me keep asking questions that you would feel are elementary or would you rather me admit to my short comings thank everyone for their replies and move on. I could easily keep asking questions to the point that you got frustrated with me for not getting it. So again I thank everyone for their posts on this subject. Sorry if my skill level is not up to the prerequisites for posting a question on this forum.

Tom
Title: Re: Could this be done with Mach
Post by: stirling on August 22, 2011, 03:44:36 AM
Tom, you asked for the DXF. I posted it along with 2 images to help further. OK so you still didn't get it - that's not a fault. I have no way of knowing your skill level I was just doing my best to help. I'd have happily given a step by step, but you just ignored my last post and that's just plain simple bad manners and why I'm pi**ed off.

Ian
Title: Re: Could this be done with Mach
Post by: kencor1 on August 22, 2011, 08:22:45 PM
Ian, it may have seemed like I ignored your post, I did not. I have been still playing with mastercam. I created the 2 surfaces and created the curves based on the intersections, then made all of the curves into small straight lines. I the tool pathed it and output the file. I looked at the g-code and it seems to look OK but no real way to tell until I would run it on an actual machine.

So your idea seems to work. But if I can output 2 separate tool paths and have 2 systems running Mach and have the 1st system start the 2ND based on a DRO or even a switch of some sort I could achieve the end result without the extra work needed to produce the 3d geometry. I am just thinking out loud. Just trying to use the the KIS rule.

Tom
Title: Re: Could this be done with Mach
Post by: olf20 on August 24, 2011, 07:40:37 AM
Very interesting thread. I like doing things with
Mach that is not common. I also only gain from
the brains of others and hard work. I hope it continues.
olf20 / Bob
Title: Re: Could this be done with Mach
Post by: olf20 on September 10, 2011, 07:54:49 AM
Tom have you made some progress with your project??
olf20 / Bob
Title: Re: Could this be done with Mach
Post by: kencor1 on September 13, 2011, 07:43:14 PM
I have put this on the back burner for now. Hopefully sometime in the near future I can start building the lathe. But I may try and buy a copy lathe and then convert that. I am keeping a look out for a centuaro T5E I feel that would be the easiest to convert

Tom
Title: Re: Could this be done with Mach
Post by: Sargon on September 13, 2011, 08:23:03 PM
I heard that Mach4 will be able to run 2 planners. This could resolve the problem completely if it does. Just a thought.

Linking two computers would be difficult as the pulse frequency would not be synced, and thus the feed rate would likely differ noticeably. Perhaps not impossible, but I think it would be opening a can of worms.

Just my 2 cents.

Chris