Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: scoobystu on April 14, 2014, 06:59:22 PM

Title: When is a circle not a circle? When it's 4 arcs!
Post by: scoobystu on April 14, 2014, 06:59:22 PM
Hi there,

I am new to CNC and mach3 and am in the process of setting up a machine that I bought for woodwork. I previously had a problem with getting accurate 90 deg corners (without rounding) with CV on but that was resolved by changing to a post processor using arcs. The problem I now have is that when cutting circles using the arc method (I am using artcam which turns circles into 4 adjoined arcs) at each point where one arc ends and another begins I get a flat spot. Previously using the post processor that I think converted it to absolute coordinates the circles were spot on. Equally when I tried the Mach3 circle wizard again it was accurate even although it also uses arcs, the crucial difference being that it creates one 360 deg arc.

The work around I have at the moment involves using two different post processors if cutting circles or if I am cutting square shapes with artcam. I would be very grateful if someone who has experienced this before could point me in the right direction. In an ideal world I would only have to use one post processor to cut out the job in one go. Or is there a setting in Mach that allows for the fact that circles have been split into 4 arcs and compensates when it cuts them out.

Any help would be appreciated.

Stu
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: BR549 on April 14, 2014, 09:12:53 PM
Sounds like backlash is causing the flatspots. With a continous arc to make a circle the screws never really unload but with 4 quadrant arcs to make a circle the code stops at 4 places for a complete circle hence the flat spots.

Just a thought, (;-) TP
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: scoobystu on April 15, 2014, 04:35:28 PM
I had a feeling that backlash may be mentioned. Having read a few other similar posts that seemed to be the culprit. I will need to see if I can find a dial gauge.
Title: When is a circle not a circle? When it's 4 arcs!
Post by: JohnHaine on April 15, 2014, 05:12:52 PM
Even cutting a full circle the screws have to reverse at some point and backlash will come in then.


Sent from my iPad using Tapatalk (http://tapatalk.com/m?id=1)
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: Overloaded on April 15, 2014, 05:24:48 PM
Could be flexing of the cutter or play in the spindle / Z axis mounting .... or just combined lack of rigidity and flex in the entire mechanics of the machine.
Unloading the tool with a pause would manifest these conditions.
Possible.

Russ
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: scoobystu on April 16, 2014, 03:50:45 PM
My main query would be why will it cut an exact circle if I am not using a post processor with arcs but when I use arcs I get flat spots. The flat spots are consistently about 1mm smaller overall on any circle when using an arc post processor.
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: ger21 on April 16, 2014, 05:12:11 PM
Can you post some pics of the results, and the code you're using?
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: scoobystu on April 16, 2014, 05:59:33 PM
(http://wp.me/aRmKz-dc) I hope this image has made it onto the thread. If not here is a link to it. http://clachanwood.wordpress.com/?attachment_id=818 (http://clachanwood.wordpress.com/?attachment_id=818)

It is quite hard to see the problem on it's own so I have fitted the dodgy circle into a circular rebate I did using a post processor without arcs.


The code I used is as follows, for the defective circle.

G17
G0Z12.400
G0X0.000Y0.000S18000M3G04P15
G0X-78.000Y-0.000Z12.400
G1Z-4.650F5100.0
G3X0.000Y-78.000I78.000J-0.000F9900.0
G3X78.000Y0.000I0.000J78.000
G3X0.000Y78.000I-78.000J0.000
G3X-78.000Y-0.000I0.000J-78.000
G1Z-9.300F5100.0
G3X0.000Y-78.000I78.000J-0.000F9900.0
G3X78.000Y0.000I0.000J78.000
G3X0.000Y78.000I-78.000J0.000
G3X-78.000Y-0.000I0.000J-78.000
G1Z-13.950F5100.0
G3X0.000Y-78.000I78.000J-0.000F9900.0
G3X78.000Y0.000I0.000J78.000
G3X0.000Y78.000I-78.000J0.000
G3X-78.000Y-0.000I0.000J-78.000
G1Z-18.600F5100.0
G3X0.000Y-78.000I78.000J-0.000F9900.0
G3X78.000Y0.000I0.000J78.000
G3X0.000Y78.000I-78.000J0.000
G3X-78.000Y-0.000I0.000J-78.000
G0Z12.400
G0X0.000Y0.000
G0Z12.400
M05
G0X0.000Y0.000
M30
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: RICH on April 17, 2014, 07:03:13 AM
X coordinate varies with Y coordinate as the cutter moves along the circular path.
As the movement approaches the end of the arc very small changes in one verses the other are occuring.
Rounding errors in the movement calculations do occur and that's why a full circle is often broken
into 4 arcs.

As stated  backlash is a problem, cutter runout / flexing and axis  resolution along with steps per unit settings
also can come into play.

I would suggest that you do only one cut and not multiple depth cuts into material  that would show how
accurate your machine is cutting for different sized circles. One rough and then say a spring pass.
 A mill is not a lahe but you can machine close tolerance circles so think the problem is your machine.

FWIW,
RICH
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: GaryB on April 17, 2014, 09:57:45 AM
Uncheck the create with arcs under the circle creation tool, the circle will then be created with beziers
Gary
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: scoobystu on April 17, 2014, 06:01:41 PM
Thanks Rich, I was considering that it could be a calculation error but it is translating into a large error at the machine for some reason. I will measure backlash but not sure how I could measure flex. I have tried cutting 2mm deep circles but with the same result. I was cutting the full thing out to fit into a hole as it was easier to see the error.

I know that this will probably not cure the problem but I have been looking into smooth steppers. I have also noticed that during engraving the machine is very jerky which is causing it to vibrate. Would a smooth stepper help this and possibly help my circle issue. What would be a good smooth stepper to buy and are they easy to install for a newbie?

Could there be a mismatch between my computer and the kernel speed that mach is set to? How do you determine the correct kernel speed to run at with respect to the PC?

Gary, I tried changing the setting to beziers but it made the problem worse, I got 12 flat spots rather than 4.....

Stu
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: Hood on April 18, 2014, 04:03:51 AM
Not read the whole thread so what I will suggest may already have been mentioned.
To see if it is flex you could rerun the code several times over the same point, if the circle gets better each time then that would suggest flexing of the machine is the issue. Reason being is each time you rerun it is cutting less material and thus lesss stress on the machine and less flexing.
Hood
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: stirling on April 18, 2014, 05:24:56 AM
IF CV is working "properly" AND if the 4 arc segments join correctly i.e. tangentially, then you should see no difference between 4 (90 degree) arcs and 1 (360 degree) arc because the blend between the 4 arcs should be "seamless". In that case any backlash and/or flex should produce identical results for both schemes.

If however CV is NOT working properly OR the segments do not join "properly" then you will get an "interruption" in the blend at each join which itself could cause issues but also the effects of any backlash/flex will be made more obvious.

In your gcode, the 4 arcs do appear to "join" correctly" which when added to your statement:

I have also noticed that during engraving the machine is very jerky which is causing it to vibrate.

strongly suggests to me at least that you DO have a CV problem.

Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: scoobystu on April 18, 2014, 06:09:12 AM
Thanks stirling, How can I check that CV is working properly? As I mentioned previously I was having CV issues with rounding of 90 deg corners until I changed to using a post processor with arcs. I have tried to change CV settings to see if that made any difference but I have gone back to clearing all the CV check boxes in the config.

A bit more info that I forgot to add is that I have been speaking with someone who has an almost identical machine to mine and is also running Mach3. His machine will cut circles using arcs without a problem and he has sent me a few files which he has tested with good results at his end but do not work on my machine. Tried using Vectric to generate the G Code to make sure Artcam wasn't doing something weird but I am still having the flat spot issue.

The most annoying thing is that I know it can cut good circles just not with arcs at the moment!!
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: stirling on April 18, 2014, 06:39:36 AM
first check you actually have CV ON as you have no G64 in your code. Then maybe post your xml.
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: scoobystu on April 18, 2014, 08:19:39 AM
The radio button in the general config is checked for CV. I take it that it will be on by default unless otherwise instructed by the Gcode?

I will have to wait until I am next at my machine to get the xml file.

Having re-read the Mach3 install document I see that a kernel speed of 35kHz is recommended for stepper motors mine is set to 45kHz. Would that make a difference?
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: stirling on April 18, 2014, 09:01:23 AM
The radio button in the general config is checked for CV. I take it that it will be on by default unless otherwise instructed by the Gcode?

Yes.

Having re-read the Mach3 install document I see that a kernel speed of 35kHz is recommended for stepper motors mine is set to 45kHz. Would that make a difference?

Got a link? The kernel should be set to the lowest frequency that supports the max speed you require/can get. Generally speaking, with steppers, this means 25KHz. Setting the kernel to higher than needed is at best pointless and at worst likely to cause problems.
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: scoobystu on April 20, 2014, 03:44:08 PM
I changed the kernel speed to 25kHz and it has slowed the machine down a bit but hasn't solved the issue.

XML file attached I hope.
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: stirling on April 21, 2014, 06:30:35 AM
OK your steps/per of 127.3 and max vel of 15m/min for X&Y does indeed require a kernel of 35KHz. HOWEVER...

Your accel is pretty poor at just 500mm/s^2.

Max vel and accel are generally a trade off. Personally I'd lower your max vel and see whether you can improve your accel. CV and good accel make good bed-fellows.

You're getting different results between a full 360 and 4, 90 degree arcs. The ONLY difference I can see is that with the 4 arcs, CV HAS to do a blend whereas with a full 360 it doesn't. Given your accel is so low, I think this may be your problem (particularly with your high feedrate of 9.9m/min).

If you choose to try this then leave your kernel at 25KHz because it's sufficient for anything below 11m/min with your steps/per and I'd expect you to be reducing below even that quite dramatically to get usable accel.

BTW - you may want to revise your pin settings for e-stop.
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: scoobystu on April 21, 2014, 03:17:06 PM
Stirling, I did notice a distinct drop in speed when I put the kernel speed down. I should be able to bump the acceleration up a fair bit. When I was having trouble with 90deg corners I ended up putting the acceleration up to about 1200mm/s^2 to get it to cut sharp corners but seeing as I had started at 500 I thought it was a bit much. When I changed to the arc post processor I put the acceleration back to 500. I noticed that when the acceleration was at 1200 during cutting squares there was a wee bit of bounce after each corner so I suppose a safe acceleration would be about 1000? I did try a circle with the acceleration at 600 but it made no difference. I will increase the acceleration tomorrow. This may sound like a silly question but is the deceleration value the same as the acceleration value?

With respect to the e-stop pin. It was set to 10 or 11 I can't remember off hand which is the same as the Z zero plate. Every time I tried to zero the tool I got an e-stop. Someone suggested changing it to pin 2. I take it this is what you are talking about? Someone also said that I could assign pin 7 or 8  to the zero plate and leave the e-stop where it is. The first method worked and I left it for the time being until I tested other things. Should changing the zero touch plate to pin 7 or 8 work. If so I will do that as I would prefer that the e-stop system worked properly! 

Thanks very much for your help.   
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: stirling on April 22, 2014, 06:19:03 AM
you want your accel as high as possible. However it will be limited both by your motor power and jerk. From what you say it would seem you have rigidity problems if an accel of 1200 is causing wobble.

However, concentrating on the difference between your 4 arcs and a single arc try your accel at 1200 and slow your feed down - 9m/min is pretty fast if you a) have rigidity issues and b) your accel is not so good.

Using a single parallel port you have 5 inputs of which your e-stop should be one. Pin 2 is an output, as are 7 and 8. Look at the bottom of the input/output dialogs - it tells you the valid input and output pins.

accel and decel are the same in Mach.
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: scoobystu on April 22, 2014, 04:04:59 PM
Success! I increased the acceleration to 1100 and now have much improved circles. There is still a wee bit of a flat area at one point which is 0.3mm smaller overall. I think I can live with that for the time being, with a bit more testing I will see if it is consistent. Now that I think about it I was getting the wobble when the 90deg corners were being cut in tiny radii so I might be able to increase the acceleration further.

Changed the e-stop pin to 11.

There is still a wee stutter in certain places which seems a bit strange. I was cutting large smooth arcs today and at the transition point where the arc is split there is a a slight hesitation and then it carries on. Is it seeing that there is a join in the arc and thinking about it? Is that a characteristic of stepper motors? The look ahead is set to 200 lines as recommended by mach handbook.

I realise that I may be barking up the wrong tree here but would a smooth stepper improve the performance?
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: stirling on April 23, 2014, 07:15:40 AM
Sounds good. So is it now cutting the same for a 4 arc circle as a 1 arc circle?

Is it seeing that there is a join in the arc and thinking about it?

It shouldn't be if CV is doing what it's meant to. Just to re-state: If CV is working properly there should be absolutely no reason for it to cut 4 tangentially meeting arcs any different to a single arc. i.e. there is absolutely no need for a speed change OR for any rounding at the "joins".

Is that a characteristic of stepper motors?

Not sure what you're meaning. Is what a characteristic of stepper motors?

The look ahead is set to 200 lines as recommended by mach handbook.

Hmmmmm. Where does it say this? My default was 20 and my manual says it shouldn't need changing and indeed I never have.

Lookahead tells the planner the maximum number of sequential feedrate moves it should consider at any given time. The maximum number of sequential feedrate moves in the whole code you posted was only 20. I think you can see where I'm going...

I realise that I may be barking up the wrong tree here but would a smooth stepper improve the performance?
With Mach I've learned never to say never. But if we're still concentrating on why a 4 arc circle cuts differently to a 1 arc circle, then personally I can't see how it could make a difference.

Anyway - things seem to be improving so that's good.

Cheers

Ian
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: scoobystu on April 23, 2014, 05:55:23 PM
Yes, it is now cutting the same for a 4 arc circle as a 1 arc circle.

I can see your point about the lookahead and it was set to 20 steps by default but again, possibly I imagined reading it or someone recommended to change it to 200. I did think it a bit odd when trying to run a circle program that had at best 20 lines so setting it to 200 seemed a bit pointless. Perhaps I should trust my own thinking but at the time I thought it may have been better suited to when I actually got round to running bigger programs. Anyway as a newcomer to this every day is a learning experience. I will set it back to 20. I also learned to never try and open the config when cutting something on the machine. It did not like that.

With respect to the CV distance value is that lines of code or is it steps in a direction? Is it worthwhile turning that on? What is it's purpose? When you say that if CV is working properly... how do I know that it is not? Is there a shape (don't say circles) that I could cut that would show it is doing what it should?

The stuttering effect I sometimes see when it comes to a transition point in a curve is what I was referring to when asking if it is a characteristic of the stepper motors. Setting the lookahead back to 20 may cure this I suspect.

I think I may be able to reduce the feedrate of the cutter a bit but I am using twin fluted cutters and I think that is about the right feed speed for them. When increasing the acceleration at what point will I know that it is not actually having any physical effect due to the trade off between velocity and acceleration? I have been watching the feedrate DRO as it has been cutting and on curves and anything that is not a straight line then obviously it drops a fair bit but once it gets to a straight line it accelerates well up to max feedrate. I am bearing in mind you have never seen this machine... however ... what is an ideal acceleration value to aim for? Or am I not actually looking for a value just the performance of cut?

I apologise in advance for continuing to ask foolish questions!
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: stirling on April 24, 2014, 09:40:41 AM
CV distance is in your machine units. It just says - don't blend until you're at least this close to the join. Sounds great - nice tight (small radius) corners. Problem is - you don't get anything for nothing. The smaller you make this the more the axis HAS to slow down and of course the name of the CV game was NOT to have to slow down.

TBH - my view is really that if you have to start tuning CV you're already in trouble.

Velocity/Accel - always a trade off. Get as much of both as you can. Great velocity with crap accel is no good. Neither is ace accel and crap velocity. If you can't get a good balance that does the job - it's hand in pocket time again.

Ian
Title: Re: When is a circle not a circle? When it's 4 arcs!
Post by: scoobystu on April 24, 2014, 03:55:28 PM
Thanks Ian.

I will spend some time playing about with the acceleration and velocity. I hope to not have to use the additional CV settings.

I bought this machine to make furniture components with but not in huge quantities. I think it will do pretty much what I am looking for but if I had to spend another couple of hundred quid I would, providing it was a benefit. I am talking about a smooth stepper rather than upgrading motors or drives. But then which smooth stepper to buy.... If I thought it would be a straightforward installation then I would probably just get one. Buying a smooth stepper and finding it causes more problems would not be ideal. Being self employed and trying to make money during the day and finding a few hours here and there to test the CNC is proving tricky. Although to be fair I did not expect it to be straight forward.