LinuxCNC EMC2 trouble cutting inside corners (fillet)

LinuxCNC EMC2 trouble cutting inside corners (fillet)

jnackard
Contributor Contributor
4,659 Views
9 Replies
Message 1 of 10

LinuxCNC EMC2 trouble cutting inside corners (fillet)

jnackard
Contributor
Contributor

I am having trouble in linuxcnc cutting a pocket (from 2d contour).  Using the linuxcnc Fusion 360 post.  When I load the toolpath, it looks fine on the screen and when it's running it puts an larger radius on the inside fillets.  In the picture, the white line the toolpath and the redline is where it is actually going.  I have tried many different post processor settings and toolpath settings and there is always a radius that is too large left.  Interestingly enough, if I change from roll around a outside corner to keep sharp corner, the radius decreases, but I need it to go away completely.  Also, the exact same program ran on my tormach runs as it should....so I am at a loss to figure this out.  Any ideas?fillet.jpg

0 Likes
Accepted solutions (2)
4,660 Views
9 Replies
Replies (9)
Message 2 of 10

jnackard
Contributor
Contributor

I figured it out ....linuxCNC/EMC2 needs the following line in the header G64 P.001 Q.001 in order for the output to be correct.  I'm not sure how anybody has been using the supplied linuxcnc post processor with any success without this.  I would like to edit the post processor to eliminate the G53 G0 Z0 at the beginning and end of the file  and add the G64 P.001 Q.001 to the header of the file.  I looked at post processor config file but It is difficult for me to follow.  Can anybody help me do this?

0 Likes
Message 3 of 10

Steinwerks
Mentor
Mentor

http://linuxcnc.org/docs/2.6/html/gcode/gcode.html#sec:G64

 

Path blending? That's a weird one for sure. I've used the generic LinuxCNC post before (been a few years though) and had no such issues at the time.

 

That said, I've made the couple modifications in the post attached. As usual with post mods, test with extreme care!

 

I've added a user option in the post to turn on and off retracts called userRetract with the default set to Off.

 

Hope this helps.

Neal Stein

New to Fusion 360 CAM? Click here for an introduction to 2D Milling, here for 2D Turning.

Find me on:
Instagram and YouTube
0 Likes
Message 4 of 10

jnackard
Contributor
Contributor

Hi Neal,

Thanks for the reply.  I tried the post in the attachment but there seems to be a problem with it.  There are no properties or values listed when I select it and I couldn't get it to spit out a file.  The G64 is necessary for the EMC2 trajectory planner.  If it's not there the machine will try to minimize acceleration and cut off square corners and make them round.  The problem (and solution) I had is described here...

 

https://forum.linuxcnc.org/38-general-linuxcnc-questions/30440-rounded-corners-and-rounded-down

 

This post below is for machinekit (essentially EMC2) and includes the required G64 and is what I am using now

 

https://gist.github.com/cho45/977213c3102473f2f4506d4a41ba3ab6

 

AS far as the retracts, I'm not sure what your post modified, but the problem I have (and maybe others) is that I am using a CNC router I built and I don't have a homing program (or limit switches, for that matter).  So any g53 or g28 with a z0 is going to move the tool very fast to a place it should not be.  Not sure if it's possible to make that an option to turn off or not. 

0 Likes
Message 5 of 10

Steinwerks
Mentor
Mentor
Accepted solution

It's always nice when one missed comma can tank a post, right? Smiley Embarassed

 

Try this one.

Neal Stein

New to Fusion 360 CAM? Click here for an introduction to 2D Milling, here for 2D Turning.

Find me on:
Instagram and YouTube
Message 6 of 10

jnackard
Contributor
Contributor
Accepted solution

Thanks Neal.  It works perfectly!  I would recommend this post as the default linuxcnc/EMC2 post. Awesome

0 Likes
Message 7 of 10

marty
Contributor
Contributor

This is great. In a recent thread on the LinuxCNC forum, a user posted a similar post which allows configuration of the P value at time of posting the g-code. Which is a nice feature.

https://forum.linuxcnc.org/fusion-360/36097-fusion-360-milling-post-with-g64-pn

 

The ultimate implementation of G64 for LinuxCNC, though, would be for G64 P and Q values to be implemented based on the "Smoothing" parameter set on a per-op basis. 

It looks like the code from this thread might be a good start:

https://forums.autodesk.com/t5/hsm-post-processor-forum/need-help-to-program-smoothing-into-g61-g64/...

 

Anyone have a good idea about how to get this working? I think we'll need an overall G64 P.00x preamble on every program or else you can get some extreme rounding at high speeds due to LinuxCNC's trajectory planner.

 

But the ability to set the smoothing value automatically, per op, via Fusion CAM/HSM will make it actually work on LinuxCNC platforms as we expect HSM gcode to function. 

 

0 Likes
Message 8 of 10

marty
Contributor
Contributor

I figured this out, and it works great. Smoothing parameter is used to define the G64 P value on a per-operation basis.

 

I hope this helps someone out!

Message 9 of 10

andypugh
Enthusiast
Enthusiast

This issue is typically seen when a machine is configured with high axis velocity limits and low axis acceleration limits. 

When you say that a machine can move at X m/s but can only accelerate at Y m/s2 (or imperial equivalent) then you are actually defining a minimum turn radius that the machine is capable of following.
Without instructions to the contrary (ie a G64 command) then LinuxCNC will run at the programmed feed speed, and modify the corners according to your stated acceleration limit.

 

G64 instructs that system to slow in the corners to make a tighter turn. 

 

But the numbers suggested here are probably only applicable to an imperial machine, and are impractically small for a metric machine. 

And, even then, they really are something to configure on a per-machine basis. 

0 Likes
Message 10 of 10

harindugamlath
Contributor
Contributor

Thank you for your post. I was having huge trouble with my mill with the G64 issue. I will try your post. Did you made any updates to the post after?

0 Likes