Hello Guest it is March 28, 2024, 01:36:00 PM

Author Topic: Weird problem with Mach3 and tool paths  (Read 9676 times)

0 Members and 1 Guest are viewing this topic.

Weird problem with Mach3 and tool paths
« on: February 12, 2011, 02:27:05 AM »
Using D2NC, I generated the code below. Two really weird things happen in Mach3. First, while the part shows up fine, the tool path around it is crooked in places!. Second, if I click run, it doesn't even follow the tool path, but makes first a circle about 1/4 smaller than the part, then traces the circle again. Once in test, the second circle was MUCH bigger. The author of D2NC seems familiar with this problem, but I really hate bugging him to work around a Mach3 problem.  Can anyone help with this?

(D2nc generated code)
 
G17  (set xy plane)
G90  (absolute mode)
G40  (cancel cutter radius comp)
G49  (cancel tool len offset)
G80  (cancel canned cycle)
G50  (reset scale 1:1)
G91.1 (IJ relative arcs)
G20  (inch mode)
 
(Tool diameter: 0.01 )
M05  (stop spindle)
M06 T0 (tool change)
M03 S1000 (spindle on)
 
G00 Z1
G00 X0 Y0
G00 X-.0150 Y-.0625
G42 P.0050
G00 Z.1000
G01 Z-.0100 F0.5
G01 X-.0075 Y-.0625 F1
G02 X.0000 Y-.0700 I.0000 J-.0075
G01 X.0000 Y-.1400
G01 X.0000 Y-.1400
G01 X.0000 Y-.2800
G01 X.0250 Y-.4400
G01 X.0250 Y-.2800
G01 X.0500 Y-.2800
G01 X.0500 Y-.4400
G01 X.0800 Y-.2800
G01 X.0800 Y-.1400
G01 X.0800 Y.0000
G01 X.0000 Y.0000
G01 X.0000 Y-.0700
G02 X-.0075 Y-.0775 I-.0075 J.0000
G40  (cancel cutter radius comp)
G01 X-.0150 Y-.0775
G00 Z1
 
M05  (stop spindle)
M09  (all coolant off)
G00 X0 Y0
 
M30  (end with rewind)

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Weird problem with Mach3 and tool paths
« Reply #1 on: February 12, 2011, 05:33:29 AM »
Hi RC,

Firstly, I am no expert so this is just my opinion after running your code.
I don't think it is a Mach problem as Mach appears to be just following the code it has been given. Your lead-in and lead-outs have been incorrectly positioned and that is what is causing the toolpath to be crooked.

Tweakie.
PEACE

Offline alenz

*
  •  137 137
    • View Profile
Re: Weird problem with Mach3 and tool paths
« Reply #2 on: February 12, 2011, 06:05:33 AM »
My take is a bit different. Your code runs just fine here without the G42 cutter comp. No extraneous circles. Only the lead in and lead out arcs which are correct.
But it seems to me that Mach’s cutter comp is broken. It doesn’t allow for sharp corners. On the sharp points, it goes from the last offset X to the next X cross country as the crow flies rather than properly arcing about the point and resuming the offset. I offset in CAD and don’t use G41/G42 so this was news to me. (There may be a Mach setting that I'm not aware of that affects this?)
Sorry, can’t help more.
Al
« Last Edit: February 12, 2011, 06:11:41 AM by alenz »

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Weird problem with Mach3 and tool paths
« Reply #3 on: February 12, 2011, 07:16:46 AM »
The author of D2NC has long complained about a bug in cutter comp on the Yahoo group. Unfortunately, the bug will not be fixed until the V4 release of Mach3.

Personally, I use G41/G42 in almost all of my programs, and have never seen this error.

Doing some testing with your file, it seems that the very small tool is what causes it. Increasing the tool size will give you the correct path with a tool diameter of .015. But that tool is too big to cut your part. (you need to change the lead-in and lead out arcs to increase tool size)

Not sure why D2NC continues to use G41/G42 when it seems to have problems quite frequently. Does it have an option to offset the code without G42/G42? If it does, then that should work fine for you.

Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Weird problem with Mach3 and tool paths
« Reply #4 on: February 12, 2011, 08:07:05 AM »
I remember Brian giving a review about some nuisances on cutter compensation and remarking that it would be changed to follow compensation as defined by
Smid. That was a year or two ago. The problem in this one is as Al states and happens at the sharp points and change of direction. Attached a back plot of your code. I would like to remark that the lead in's have avery small radius  ( .0075") so i don't know what kind of tool your using and can be the culprit. The cutter radius must always be smaller than the smallest inside radius of the part contour. I would suggest that you radius the corners in cad and see what D2NC produces for code.

RICH

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Weird problem with Mach3 and tool paths
« Reply #5 on: February 12, 2011, 08:40:46 AM »
Rich, I removed the radius lead in and lead out moves and it didn't make any difference. Only increasing the tool size seemed to fix the errors.

As you said, a long time ago, Brian released a test version of Mach3 with the comp fixes. However, it had other bugs in it and was removed from the download page. The fixes were to be in V4, which was supposed to be released over a year ago, I think. Maybe we'll see it this year. :)
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Weird problem with Mach3 and tool paths
« Reply #6 on: February 12, 2011, 09:21:38 AM »
Gerry,
No problems here since I usualy generate code using an offset. In LC if it dosn't like the lead in or lead out or cutter radius  you see the affect imeadiately and adjust
accordingly.
Like Al, if i get a problematic file i sometimes just draw the required offset pathing and cut on the line ( tool diameter is accounted for in CAD) .......not worth the time trying to figure out why something is not working sometimes. ;)

RICH
Re: Weird problem with Mach3 and tool paths
« Reply #7 on: March 21, 2011, 10:35:18 AM »
Actually, the small radius was put in to hopefully work around the Mach3 bug. It didn't fix it completely, but I used to make usable parts. Then I dropped the whole project for a year or so, and when I started with the latest Mach3, it didn't work anymore.
Well, hopefully they figure it out. Thankfully, Graham's code works perfect for me, so I now do cutter compensation with D2NC. It just gets me nervous that code that I believe should need to be rock solid has had known bugs for years.