PDA

View Full Version : Machine Slow on Curves



swisscheese
06-04-2014, 04:32 AM
Hi,

I seem to be having a problem when I cut curves on my machine. Im running it with Linuxcnc. It doesn't have any problems when cutting circles. It is just when there is a curve that is made with multiple circle radius's.
This isn't a mechanical problem but a software/computer speed problem. When it is cutting a curve the machine accelerates and decelerates because the computer cant spew out the information fast enough(im guessing this is the problem).

Has anyone came across this problem before and found any fixes? I've heard that disabling the internet card frees a lot of speed up on the computer. Maybe adding more ram might help?

Any info would be really helpful as in the near future im going to be cutting out some big molds out of foam for fibreglass. The molds are for a fsae car hence are heavily curved, none being a nice simple circle.

Thanks

AndyGuid
06-04-2014, 05:45 AM
Hi from this CNC newbie. It will be a while before the UK wakes, so meantime I'll pass on what I think I've read. . .
The recommendation seems to be to run Mach3 or equivalent off a dedicated desktop PC that is as close to a raw vanilla O/S as possible, to avoid the potential for problems, which problems may be similar to what you are suspecting.
Even old laptops that have a parallel port tend to be avoided due to the complications introduced by special laptop software such as power-saving settings. I understand that using a device such as an ESS (Ethernet Smooth Stepper) can dramatically improve the reliability of the PC-Machine interface and think that ESS is favoured by JAZZ. I think Jonathon is a Linux fan.
In short I would try deactivating whatever you can and see what difference it makes.

JAZZCNC
06-04-2014, 10:19 AM
It will probably be down to CV mode. CV can be set to either Exact stop G61 or Constant Velocity G64. Check the G-code to see if it contains G61.

G61 will pause at the end point of each Arc or line segmant that make up the curve but follow closely the shape.

G64 keeps a constant feed by blending one segmant into the other, when the first segmant starts to decelerate at it's end point the next segmant starts to accelerate and the moves get blended together. This can give the affect of larger than required radius in square corners as the control try's to maintain commanded feed and acceleration while going around the bend but the control says hold on I can't go that fast around that bend but as to maintain the speed so it changes the radius to one it can go around at that speed.!! The affect of the radius is inversely proportional to acceleration. For this reason G64 as P & Q parameters to help with path deviation.

Mostly you'll cut in G64 mode as it gives smoother operation around corners. G61 is ok if your doing lots of point to point work but can be very jerky in corners, esp when the corner is made up of lots of line segments like lots of Cam software like to spit out. You can instantly tell when machines set in G61 because it shakes the machine in corners.

If your G-code doesn't contain G61 then type G64 into the MDI before running same code and see if it runs differant. If it does then chances are Linux default parameters are set to G64.? I don't use Linux cnc so can't help you here.

One thing I do know thou is a very experienced CNC user who migrated to linux cnc came back to Mach3 because among other things the CV in Linux cnc was rubbish.!! . . . . It could be the same issues your experiencing.?

magicniner
06-04-2014, 10:38 AM
If the problem were with Mach3 I'd suggest the official Mach3 support forum as the support is excellent both from general members and the very experienced admin staff, the response to requests for assistance there is outstanding, presumably Linux CNC too has a support forum, have you asked there?

m_c
06-04-2014, 12:20 PM
There's a new LinuxCNC projectory planner being written, as the existing one has issues in some key areas.
Ironically the discussion about it was on the Mach yahoo group, as somebody had swapped back to Mach3 to get better performance - https://groups.yahoo.com/neo/groups/mach1mach2cnc/conversations/messages/143177

Jonathan
06-04-2014, 01:06 PM
When the machine follows a curved line, both axes are accelerating. If the acceleration setting in the motor tuning is too low, the machine will therefore have to slow down. So check what your X and Y accelerations are set to.

Edit: The above is probably irrelevant, didn't spot that you said it was fine with circles.

JAZZCNC
06-04-2014, 01:44 PM
There's a new LinuxCNC projectory planner being written, as the existing one has issues in some key areas.
Ironically the discussion about it was on the Mach yahoo group, as somebody had swapped back to Mach3 to get better performance - https://groups.yahoo.com/neo/groups/mach1mach2cnc/conversations/messages/143177

Surprise surprise eh.!! . . . . . So Those returning to Mach complaining about these " Key Areas" are not just trouble causing Geek haters.! :uncomfortableness:

swisscheese
06-04-2014, 01:54 PM
Thanks for all these responses! Jazz will have to read your post again and will get back to you. Never had any problems with rounded square corners. Havent got any code on me now.

I think its best if I upload a youtube vid. Ill post it here. Should be here in less than an hour.

Ger21
06-04-2014, 02:02 PM
Read this post and the few that follow it. You apparently need to specify Q0 when using G64 mode, or you'll get the results you're seeing. A lot of people have complained about the CV mode in LinuxCNC for a long time, and part of the issue is apparently due to a lack of documentation.

New Trajectory Planner - Testers/programs wanted (http://www.cnczone.com/forums/linuxcnc-formerly-emc2-/206712-new-trajectory-planner-testers-programs-wanted-post1453726.html#post1453726)

swisscheese
06-04-2014, 02:05 PM
I just remembered ive already uploaded a vid that kind of shows it. Here it is

https://www.youtube.com/watch?v=EiJSLtEpkho

swisscheese
07-04-2014, 12:50 AM
Here's the video which shows the problem clearly.

https://www.youtube.com/watch?v=0dJGOnngLEY

JAZZCNC
07-04-2014, 12:59 AM
Yep that looks like G61 exact stop so try G64 and like Ger says enter Q parameter with value of Zero because Linux CNC seems to have a quirk that it requires it other wise G64 is ignored.! So check code for G61 and replace with G64 Q0 or if G-code doesn't have G61 just enter G64 Q0 in MDI before running the G-code as it's a Modal command so will stay set to G64 until changed by G61.

JAZZCNC
07-04-2014, 01:36 AM
Eh eh just watched your other vids of the enduro. Looks like you have that little 150 set to exact stop as well. . .Lol . . . . Stand up man and let it have it. . .Lol . . . . . Get in attack position like this 12007

but stay out the trees like this. . Lol 12008

We raced Ktm's for 3 years and the 150SXF I used for a practice bike was the most run you could have with cloths on. . .Lol.
When they first Came out they had a problem with top handle bar clamp snapping so I made a Fixed cross brace to replace them it also had the affect of stiffening the forks so they didn't twist when dropped in corners.! . . . . Some where I still have the G-code if you ever need it.
12009

swisscheese
08-04-2014, 09:48 AM
Hi Jazz, its a exc 200. I havent ridden it in over a year :( and im quite the amature at that.

Anyway these curves, well i realised they arnt curves anymore but a collection of very small straight lines that add up to make a curve!!!
Thats right, so for instance in one line of code for the curve there is only a X and a Z coordinate!
Is there anyway i can make cambam output radiuses to make the curves up instead of lots of straight lines.

Also jazz it is using G64, but this is used for the small corners in the roughing process, not in the curve process.

JAZZCNC
08-04-2014, 11:22 AM
Post the G-code so can have a look.

Like as been said earlier seems Linux CNC as a quirk and if the P or Q parameter isn't stated then G64 will be ignored so if Cambam is just putting out G64 then chances are your not actually in G64.?

Try this copy the G-code file then Delete any reference to G64 or G61 from the G-code file. Next in MDI type G64 P0 Q0 then run the code again.
G64 will stay inaffect because it's Modal and will now be used for the complete program and the rest of the session unless changed by G61 or G61.1

swisscheese
08-04-2014, 11:40 AM
G21 G90 G40
G0 Z5.0
( T0 : 6.2 )
T0 M6
( 3DSurface1 )
G17
M3 S1000
G0 X-68.3899 Y-1.24
G1 F2400.0 Z-33.0241
G1 F3500.0 X-66.7887 Z-28.8931
G1 X-65.5487 Z-26.3339
G1 X-64.3087 Z-23.7747
G1 X-63.0687 Z-21.4983
G1 X-60.5887 Z-18.0194
G1 X-59.3487 Z-16.28
G1 X-58.1087 Z-14.8685
G1 X-54.3887 Z-10.9792
G1 X-53.1487 Z-9.9919
G1 X-49.4287 Z-7.0334
G1 X-48.1887 Z-6.261
G1 X-44.4687 Z-4.119
G1 X-43.2287 Z-3.4521
G1 X-38.2687 Z-1.6107
G1 X-37.0287 Z-1.1957
G1 X-30.8287 Z-0.0754
G1 X-29.5887 Z-0.0412
G1 X-24.6287 Z-0.0064
G1 X-23.3887 Z0.0
G1 X2.8412
G1 F2400.0 X3.1 Y1.24
G1 F3500.0 X-23.3887
G1 X-24.6287 Z-0.0064
G1 X-29.5887 Z-0.0412
G1 X-30.8287 Z-0.0754
G1 X-37.0287 Z-1.1957
G1 X-38.2687 Z-1.6107
G1 X-43.2287 Z-3.4521
G1 X-44.4687 Z-4.119
G1 X-48.1887 Z-6.261
G1 X-49.4287 Z-7.0334
G1 X-53.1487 Z-9.9919
G1 X-54.3887 Z-10.9792
G1 X-58.1087 Z-14.8685
G1 X-59.3487 Z-16.28
G1 X-60.5887 Z-18.0194
G1 X-63.0687 Z-21.4983
G1 X-64.3087 Z-23.7747
G1 X-65.5487 Z-26.3339
G1 X-66.7887 Z-28.8931
G1 X-68.6487 Z-33.0241
G1 F2400.0 Y3.72
G1 F3500.0 X-66.7887 Z-28.8931
G1 X-65.5487 Z-26.3339
G1 X-64.3087 Z-23.7747
G1 X-63.0687 Z-21.4983
G1 X-60.5887 Z-18.0194
G1 X-59.3487 Z-16.28
G1 X-58.1087 Z-14.8685
G1 X-54.3887 Z-10.9792
G1 X-53.1487 Z-9.9919
G1 X-49.4287 Z-7.0334
G1 X-48.1887 Z-6.261
G1 X-44.4687 Z-4.119
G1 X-43.2287 Z-3.4521
G1 X-38.2687 Z-1.6107
G1 X-37.0287 Z-1.1957
G1 X-30.8287 Z-0.0754
G1 X-29.5887 Z-0.0412
G1 X-24.6287 Z-0.0064
G1 X-23.3887 Z0.0

Thats only a small section. I had already removed G64 when i copied it.

i put into mdi what you said and still no luck. For what it is worth the machine runs smooth and fast when i run an example provided which is a spiral. the spiral's code is lots of radius's not lots of small lines like the above

JAZZCNC
08-04-2014, 11:51 AM
Ok well maybe this is why folks return to Mach3 so then the solution is Mach3. . .:hysterical:

swisscheese
08-04-2014, 11:54 AM
Okay have just done a simple 'blob' of water outline curve which runs x and y plane. turned the outline of this blob into a dxf then code. then deleted g64. can now control g64 g61 P and Q parameters from mdi and no suprises, it all works well if set to G64P0Q0. A pattern is starting to emerge.It works well with radius commands but doesn't when a curve is made using lots of straight lines.

swisscheese
08-04-2014, 11:57 AM
So the question is how do you make cambam output radiuses for curves instead of lots of straight lines? Ive been into the postprocessor and tried all options relating to curves, it outputed exact same code though.

and no mach 3 for me!!!!:barbershop_quartet_

Clive S
08-04-2014, 12:48 PM
So the question is how do you make cambam output radiuses for curves instead of lots of straight lines? Ive been into the postprocessor and tried all options relating to curves, it outputed exact same code though.

and no mach 3 for me!!!!:barbershop_quartet_This might be a question for the linuxcnc forum:nightmare: ..Clive

FatFreddie
08-04-2014, 01:00 PM
You can make CamBam curve fit a polyline using the "edit/polyline/arc fit" menu option.

E.g.

12011

You are prompted for the tolerance so you can choose the tradeoff between accuracy and minimising the number of curves.

CamBam has a very good forum for asking these sort of questions. It is also deceptively simple and it's worth (never thought I'd say this) reading the manual to find out all the things it can do.

JAZZCNC
08-04-2014, 01:31 PM
A pattern is starting to emerge.It works well with radius commands but doesn't when a curve is made using lots of straight lines.

Well that's pretty useless then because most Cam programs that output 3D code use line segments as they tend to work with STL files which can only be straight line segments.!

Like Clive says maybe time to go speak to the Geeks.!!. . . . Good luck. :hysterical:

Ger21
08-04-2014, 11:37 PM
I don't think that any of the inexpensive 3D CAM programs can output arcs instead of straight line segments. I talked about this with the MeshCAM developer several years ago. You should be able to fit an arc to the first 3 points, then check the next point, if it lies on the same arc, then continue. Otherwise, start a new arc. I think the issue is that the entire internal structure of the program needed to be changed to accommodate this.

I've read somewhere about someone writing a utility to read the g-code and convert the line segments to arcs, but I don't recall ever seeing it anywhere. Since Mach3 doesn't have any issues with the straight segments, there was no reason to pursue it.

swisscheese
09-04-2014, 02:14 AM
You can make CamBam curve fit a polyline using the "edit/polyline/arc fit" menu option.

E.g.

12011

You are prompted for the tolerance so you can choose the tradeoff between accuracy and minimising the number of curves.

CamBam has a very good forum for asking these sort of questions. It is also deceptively simple and it's worth (never thought I'd say this) reading the manual to find out all the things it can do.

Hi,

Its not that i don't have an arc in cambam that is the problem. I do. The problem is when cambam creates the gcode it turns the arc into a series of lots of small straight lines. Im then having a problem with linuxCNC not giving a smooth output to the machine.

What i find weird in cambam is, you go to the postprocessor for linuxcnc, you then go down to 'Arc Output' and there are three options to choose from
normal
convert to lines
Helix convert to lines

So i assume normal would mean it makes a curve using lots of small radius. This isnt the case though :bull_head:

Neale
09-04-2014, 09:29 AM
In your original post, I think you said that it was fine when you cut a circle, but not a curve made of arcs of different radius. My experience with LinuxCNC cutting circles is that even with a circle made from four quarter-circle arcs (which is what Vectric VCarve seems to generate), the arcs themselves cut at full speed but LinuxCNC slows as it goes from one arc to the next, even though it's still a smooth curve. I want to follow up the ideas already given about G64 and so on, but it may well be that even if you have a series of arcs, it's not going to make much difference as you still get slowing going from arc to arc. However, you did say that your curve was a series of arcs of different radius so it's possible that Cambam can't actually do much optimisation into constant-radius arcs which is why it settles for a series of straight lines and lets the machine controller do any optimisation.

JAZZCNC
09-04-2014, 09:32 AM
So i assume normal would mean it makes a curve using lots of small radius. This isnt the case though :bull_head:

Well you know the Old saying about "ASSumeing".!!. . . . . . Stop and go ask over at the Cambam forum and I'm sure you'll get the correct answer.

Personally I feel your not going to get what you want because like as been said this is how 99% of Cam packages output there code for 3d surfaces. Obviously linux as a problem with this and CV or again you need to go ask the Linux technical guys over at there forum but again I don't think you'll have much "Simple" joy because I've heard complaints from several experienced CNC users that Linux is rubbish at CV.

I quote "simple" because like the post Ger linked to shows there is a Planner in progress that may solve this but then I think you'll be into messing with compiling machine code and programming etc which if your not into programming isn't simple. It's also IMO why Linux CNC gets labeled with the GEEK factor and what lets Linux CNC down because the answer all too often is you have to resort to DIY programming machine code to get something fixed or working like you want it.!! . . . . . Which you shouldn't have to do this and esp for such a basic function as CV to use a CNC machine.:thumbdown:

swisscheese
09-04-2014, 09:45 AM
In your original post, I think you said that it was fine when you cut a circle, but not a curve made of arcs of different radius. My experience with LinuxCNC cutting circles is that even with a circle made from four quarter-circle arcs (which is what Vectric VCarve seems to generate), the arcs themselves cut at full speed but LinuxCNC slows as it goes from one arc to the next, even though it's still a smooth curve. I want to follow up the ideas already given about G64 and so on, but it may well be that even if you have a series of arcs, it's not going to make much difference as you still get slowing going from arc to arc. However, you did say that your curve was a series of arcs of different radius so it's possible that Cambam can't actually do much optimisation into constant-radius arcs which is why it settles for a series of straight lines and lets the machine controller do any optimisation.

Just want this to be clear. When i have a curve made up of lots of different radius circles added together I dont have problem. The problem arises when I try and cut a curve that is made up of lots of small straight lines.
If you're having problems with the machine running slow, like you are with the circle made of four different arcs i suggest you play around with G64 G61, P and Q parameters like has been suggested in this thread and you should be able to get it to work.

swisscheese
09-04-2014, 09:49 AM
Well you know the Old saying about "ASSumeing".!!. . . . . . Stop and go ask over at the Cambam forum and I'm sure you'll get the correct answer.

Personally I feel your not going to get what you want because like as been said this is how 99% of Cam packages output there code for 3d surfaces. Obviously linux as a problem with this and CV or again you need to go ask the Linux technical guys over at there forum but again I don't think you'll have much "Simple" joy because I've heard complaints from several experienced CNC users that Linux is rubbish at CV.

I quote "simple" because like the post Ger linked to shows there is a Planner in progress that may solve this but then I think you'll be into messing with compiling machine code and programming etc which if your not into programming isn't simple. It's also IMO why Linux CNC gets labeled with the GEEK factor and what lets Linux down because the answer all too often is you have to resort to DIY programming machine code to get something fixed or working like you want it.!! . . . . . Which you shouldn't have to do this and esp for such a basic function as CV to use a CNC machine.:thumbdown:

Jazz, have asked on the LinuxCNC forum and again was pointed to the New Projectory Planner, which i have to somehow install myself, i don't know much about the linux system. I spose thats what you get for free:indecisiveness:

Had a look at mach3 and was cheaper than i thought :whistle:

Jonathan
11-04-2014, 09:47 PM
Have you tried changing the 'P' setting with the G64 command to something other than zero? For example, if you put G64 P0.02 that will allow deviation of up to 0.02mm from the programmed path. That will reduce the amount the machine has to slow down when changing direction, for a given acceleration.

Also, what have you set the acceleration to for all of your axes?

swisscheese
12-04-2014, 01:10 AM
Hi,

Yes I've played with values of both p and q and the change was minimal, if any.
The acceleration of x and y is about 110 mm/s^2 and z is about 95.

You're running linuxcnc aren't you? Does your machine act the same way with curves made of small straight lines?

Jonathan
12-04-2014, 01:16 AM
The acceleration of x and y is about 110 mm/s^2 and z is about 95.

Therein lies the problem - the acceleration is just far too low. You want at around 500-1000mm/s^2 on a CNC router, so re-tune your motors to obtain that. You will probably have to reduce the rapid feedrate a little.

swisscheese
12-04-2014, 01:49 AM
Whoops my bad sorry got them mixed up. That is the max velocity I mentioned above. The acceleration on all axes is above 700mm/s^2

I've downloaded mach3 trial and am going to give it a try.