Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: TT350 on May 20, 2009, 06:47:16 PM

Title: Need help with 4th axis continuous motion code
Post by: TT350 on May 20, 2009, 06:47:16 PM
Hi Guy's,

I have a job in the shop that requires some tight tolerances for some round holes  +/-.0001.  
I tried doing this in one set up but I'm getting a variation of .00015 between the X & Y axis.
The holes are not round.  
This job should really be done in a Lathe, but all I have is a manual Lathe in the shop and I have to make 30 parts to make so
I'm going to try to do this job in the mill.  
This is an adapter plate with 2 sets of hole patterns and some counter bores and alignment steps.
What I would like to do is sit my 4th axis up and rotate the 4th axis as I move the end mill across one axis (X or Y) as a 4th axis turns my part.
If one of you guy's could just show me a little piece of code that would rotate my 4th axis continuously, I can take it from there.

Here's a Youtube clip of what I'm trying to do. You will have to watch it about half way through to see what I'm talking about.
http://www.youtube.com/watch?v=vooVKTdCrQw&feature=related


Thanks for your time,
Chris
Title: Re: Need help with 4th axis continuous motion code
Post by: vmax549 on May 20, 2009, 09:58:13 PM
UNless you have a very tight/rigid commercial grade machine and climate control I wish you all the luck. I see more tolerance change than that by just letting the machine warm up.

Just a thought, (;-) TP
Title: Re: Need help with 4th axis continuous motion code
Post by: ostie01 on May 21, 2009, 02:53:55 AM
Look like the 1/4 slot drill is not really the right tool to do the job and as  I can see, feedrate is way too high for a finish pass. A brand new 1 inch end mil would do the job better

This kind of tolerance can only be achieve in a room where temperature will be very stable.

Even end mill do not have this kind of tolerance unless you buy very precise end mill.

Only my humble opinion, Jeff
Title: Re: Need help with 4th axis continuous motion code
Post by: TT350 on May 21, 2009, 04:32:52 AM
Is there anybody that would be so kind as to post a little peace of code to help me out?
Title: Re: Need help with 4th axis continuous motion code
Post by: SteinarN on May 21, 2009, 05:24:39 AM
I'm a newbie here.
As I understand it Mach has no ability to do a true continuous movement or rotation of any axe. Workarounds is possible but this doesn't give ideal results. One limitation is that the rotation of the "continuous rotation" axe has to stop between every line of g-code. If your tool end of movement isn't in air then the stop of rotation will happen with your tool still into the work piece.
Say you want to face of a work piece with an end mill while the work piece rotates, leaving a circular "edge" in the center. You do something like this: X50 A3600. Your end mill feeds 50mm across the work piece while the work piece rotates 10 full turns. However you want the work piece to rotate one full turn after the X feed stops. Your next line of code will be: A360. And there is no way to retract the end mill from the work piece before the rotation stops after this line of code. So the rotation stops and your next line may be X0. This lead to the end mill "resting" against the edge of the work piece, with the spindle running, for a short moment before it moves off. This may produce a mark on the edge of the work piece.

Here is two topics which may be of interest for you.
http://www.machsupport.com/forum/index.php/topic,11438.0.html (http://www.machsupport.com/forum/index.php/topic,11438.0.html)
http://www.machsupport.com/forum/index.php/topic,11422.msg72469.html#msg72469 (http://www.machsupport.com/forum/index.php/topic,11422.msg72469.html#msg72469)

Title: Re: Need help with 4th axis continuous motion code
Post by: vmax549 on May 21, 2009, 09:56:38 AM
SOrry but there is NO such thing as continiuos rotation CODE for the 4th axis. YOu have to program the rotation just like you program the other 3 axis as part of the total movement. Mach will interpolate the moves so all axis work together but that is about as far as it goes.

AS to the tool marks that is why you do leadins and leadouts. Also with CV on it tends to smooth out the actually stops to just a slowdown or No slowdown and a continous feed across the stop points.

Sorry (;-( But that is about how it works for ALL controllers

(;-) TP
Title: Re: Need help with 4th axis continuous motion code
Post by: docltf on May 21, 2009, 12:05:08 PM
if your hardware will allow it .this includes switches ,relays ,motors ,drivers etc.you can try making a new profile where you turn the spindle on and off like a pump.then you config  your 4th as both A-axis and spindle.then you can turn
your 4th on with M3.that way you can switch the rotary with code.you have to be carful with the code because when you use the rotory as spindle you loose 4th location.good luck trying to hold 5-diget tol with multi fluted tools.
they come with the bang and miss action buitl in.

bill
Title: Re: Need help with 4th axis continuous motion code
Post by: TT350 on May 29, 2009, 04:08:55 PM
I wrote the code by hand with deadly accurate results!

N4 M5M6 T4
N5 G43 H4
N6  M03 S2500
M08
G00 Y0.0 X-3.56
Z-.01
G01 X-3.5 A-35 F100
A-410
Z-3.56 A-420
G00 Z.312
G01`X-2.4975 A-1490 F100
A-1880
X-1.320 A-1900
Z.400
X-1.2
Z-.01
X-1.25 A-1920
A-2290
A-2340 X-1.2
G92 A0.0
M9 M5
M30
(http://i171.photobucket.com/albums/u315/TTAWD/Motormount0001.jpg)
(http://i171.photobucket.com/albums/u315/TTAWD/PANA0613.jpg)
(http://i171.photobucket.com/albums/u315/TTAWD/PANA0615.jpg)
(http://i171.photobucket.com/albums/u315/TTAWD/DSC00097.jpg)
(http://i171.photobucket.com/albums/u315/TTAWD/DSC00096.jpg)
(http://i171.photobucket.com/albums/u315/TTAWD/DSC00094.jpg)
Title: Re: Need help with 4th axis continuous motion code
Post by: vmax549 on May 29, 2009, 06:22:49 PM
yea but that is NOT +/- .0001 tolerance. You can't get that type of  measurement  with a caliper by hand. (;-)

BUT a really nice looking part.

Good job, (;-) TP
Title: Re: Need help with 4th axis continuous motion code
Post by: TT350 on May 29, 2009, 06:50:41 PM
My bad +/-.0002

The little lip that is 4.495 is .063 tall.

So how would take that measurement and what would you use?
Title: Re: Need help with 4th axis continuous motion code
Post by: MachineMaster on May 29, 2009, 07:40:58 PM
You still have to many zeros after the decimal point. Your print only calls for +/-.002
Title: Re: Need help with 4th axis continuous motion code
Post by: TT350 on May 29, 2009, 10:18:12 PM
I'm sorry about the typo.
I was at work and in a hurry to get this stuff posted.
The point is that this can be dun and it worked for me and it may
help someone in the future.

If you'll notice the feed is F100.
The feed is very slow, I'm "guessing" that Mach is commanding the "A" axis
as it has a max feed of 1300 units/min and the X axis is following the A axis.
Title: Re: Need help with 4th axis continuous motion code
Post by: vmax549 on May 29, 2009, 10:52:08 PM
The feed is based on the combined moves .Seeing the a axis is based on Degs/min it slows the other axis down. To speed it up you can run the A axis in diam mode and set the diam then mach can better match the combined speeds.
(;-) TP
Title: Re: Need help with 4th axis continuous motion code
Post by: RICH on May 30, 2009, 08:10:25 AM
TT350,
As stated before, a mill is not a lathe. A lot of lathes have runout greater than +-.0001".
Just because something shows a reading to four places dosn't mean that's the dimension you actually have.
Relative to what?
You may want review some info about part tolerances along with info on spindle and tool tolerances.
But conceptualy if all the rotating and movement going on was perfect along with a  proper surface finish you could achieve that true tolerance.  Any way, back to your question.

Used properly, a calibrated Intrimik, dial bore, or air gages  will directly measure  + - 1 or 2 tenths.  They are not cheap! Go / no go plug gage would  better as it will start to tell you if there is symetry.
LOL
RICH 
Title: Re: Need help with 4th axis continuous motion code
Post by: TT350 on May 30, 2009, 08:52:59 AM
Yea I guess your right.

But it’s nice to know I now can make a part with very tite
tolerances.

The original question was about moving the 4th  
axis simultaneously with another.

With no replies on how to do this I took a shot at it and it got the job dun.  

My mistake here is that I posted too much info about my part.

Guys don’t take this the wrong way but if I’m doing something wrong
that’s ok to tell me but take the time to show me the right way as well,
at least one of us will be better machinist at the end of the day.        
Title: Re: Need help with 4th axis continuous motion code
Post by: SteinarN on May 30, 2009, 09:14:41 AM
All in all a very good job. I now see from your drawing that the requested tolerance is +-0.05mm which I think should be fairly easy to acheive with your setup.
I had a closer look at your code. I'm not very good at writing/reading G-code but it looks like you have lead in/lead out for the rotational cut also. In combination with CV mode that maybe leads to no short stop at each line containing a rotational move. Maybe I will try to run your code cutting some air and have a very close look at a zoomed toolpath window trying to see if CV is active when running a rotational move also.
Title: Re: Need help with 4th axis continuous motion code
Post by: TT350 on May 30, 2009, 09:40:20 AM
Yes you are right it has lead in/out.
Title: Re: Need help with 4th axis continuous motion code
Post by: SteinarN on May 30, 2009, 10:20:31 AM
I just did a test. CV mode is indeed active on a rotational axis also.
I tried this code with a very high feedrate, very low accel, CV on, CV distance 10 and CV speed off:

Y200
A200 (Rotational A)

By simply looking at the toolpath window it is clear that the A200 move starts well before the Y200 move is finished, probably 10 units before.
Title: Re: Need help with 4th axis continuous motion code
Post by: vmax549 on May 30, 2009, 12:35:02 PM
THe original question was for code to rotate the A axis continously and you needed a tolerance of +/- .0001.

We told you that you cannot continously rotate the axis AND run independant code at the same time . THe option was explained AS you needed to program the A along with the xyz. AND that is what you did.

It was also explained that you could not hold the .0001 tolerance do to variables which really did not matter because your drawing showed +/-.002 tolerance.

AND if you want to get technical you did NOT make the part depected in the drawing(;-) Mainly becuase it was technically impossible to do so, SO either the drawing was wrong OR you made the part wrong. (;-)

BUT you did MAKE a nice part, and did a good job.   BUT it was nothing unusual or special as far as the technical ascept.

So please COme on down from the clouds and join the rest of us.  (;-) TP

Title: Re: Need help with 4th axis continuous motion code
Post by: TT350 on May 30, 2009, 12:50:44 PM
THe original question was for code to rotate the A axis continously and you needed a tolerance of +/- .0001.

We told you that you cannot continously rotate the axis AND run independant code at the same time . THe option was explained AS you needed to program the A along with the xyz. AND that is what you did.

It was also explained that you could not hold the .0001 tolerance do to variables which really did not matter because your drawing showed +/-.002 tolerance.

SO you did MAKE a nice part, BUT it was nothing unusual or special as far as the technical ascept.

COme on down from the clouds and join the rest of us.  (;-) TP





I'm not in the clouds.

You would rather try putting down on someone rather than trying to help them.

I don't know it all and I don't claim too.

I made some errors in my typing and you jumped all over it, I sorry.
Title: Re: Need help with 4th axis continuous motion code
Post by: vmax549 on May 30, 2009, 01:03:00 PM
I don't believe it was about typing arrors but more so the cocky attitude.

(;-) TP
Title: Re: Need help with 4th axis continuous motion code
Post by: MachineMaster on May 30, 2009, 01:27:53 PM
Your question as given was answered as best as possible. Had your question been accurate the answers would have been different.
Given the tolerances you posted, your part is a failure. Using the called tolerances, you made a good part. If you can't see the difference, .
Title: Re: Need help with 4th axis continuous motion code
Post by: SteinarN on May 30, 2009, 03:23:11 PM
I think you guys are a little harsh on TT350........
As I see it he made a reasonable question and said he was sorry for the typos. Can't we be a little more relaxad here? After all we dont compete with each other in here, we are here to ask questions and share information.
Title: Re: Need help with 4th axis continuous motion code
Post by: RICH on May 30, 2009, 08:21:55 PM
Hi All,
Just modified some verbage in the posts. Didn't care for girts when i lived on the other side of the Mason Dixon LINE and frankly don't like grits used in way said. We are above it.
SO KNOCK IT OFF OR THE WHOLE POST WILL GO!
Have fun.
RICH  ;)
Title: Re: Need help with 4th axis continuous motion code
Post by: docltf on May 30, 2009, 09:36:10 PM
good to see you got your part worked out TT and welcome to the forum. what make is the rotory you are using for the 4th.

bill

Title: Re: Need help with 4th axis continuous motion code
Post by: TT350 on May 30, 2009, 09:51:02 PM
good to see you got your part worked out TT and welcome to the forum. what make is the rotory you are using for the 4th.

bill



Hi Bill

It's the 8" model that I bought with my Tormach.