# Cad/cam Problem



## TomS (Apr 23, 2016)

Below is a screen shot of a split clamp block I'm making.  I'm using the bore as my X and Y 0,0 reference.  Top of the block is my Z 0 reference.  My mill cuts the outside profile as it should and I can chamfer the profile with no problems.  Using the same X, Y and Z references to chamfer the bore the cut is not on center.  I've double checked to make sure I haven't lost steps between operations, which I haven't.  Set up the gcode files to cut both the profile and bore chamfer cuts as one operation and separated them into two operations.  No difference, still wants to chamfer the bore off center.  Not sure what is going on.  Anyone have any thoughts on this?

For info I'm running Mach3 version 066 and D2NC for my CAM software.

Tom S.


----------



## JimDawson (Apr 23, 2016)

Are you using absolute or incremental I and J offsets?  Look at the G code and see if the arc center is in the same place on both the pocketing and chamfering operations.


----------



## TomS (Apr 23, 2016)

JimDawson said:


> Are you using absolute or incremental I and J offsets?  Look at the G code and see if the arc center is in the same place on both the pocketing and chamfering operations.



I'll check it out.  What I don't understand is why the difference when I'm selecting the same X/Y reference.  

Tom S.


----------



## JimDawson (Apr 23, 2016)

I agree, it makes no sense.  You need to find out if the problem is in the G-code or Mach3, at least you'll know where to look to try to resolve this.


----------



## rdean (Apr 23, 2016)

Not an answer to your problem but version 066 has many issues. 
062 is the most recommended version and will save you some problems later.

Ray


----------



## TomS (Apr 23, 2016)

JimDawson said:


> I agree, it makes no sense.  You need to find out if the problem is in the G-code or Mach3, at least you'll know where to look to try to resolve this.



Here's my gcode file.  Not sure how to interpret the I and J parameters.

Thanks for your help.

Tom S.


----------



## TomS (Apr 23, 2016)

rdean said:


> Not an answer to your problem but version 066 has many issues.
> 062 is the most recommended version and will save you some problems later.
> 
> Ray



I've read that too.  Up to now I've had occasional issues pop up but haven't had any major problems.  Mostly "UC100 not found" and program stops running gcode midway through a cycle.  Maybe it's time to reload Mach.

Tom S.


----------



## JimDawson (Apr 23, 2016)

My pleasure to help out.

G03 X-.7040 Y-.5682 Z-.0300 I.0000 J-.8800 F10.0
G03 X-.0321 Y-.8800 I.6720 J.5682 
*G03 Y.8800 I.0000 J.8800 <looks like the problem might be here, but maybe it doesn't need the X if it doesn't change position>*
Try changing the above line to  *G03 X-.0321 Y-.8800 I.0000 J.8800*  and run an air cut to see what happens

G03 X-.7040 Y-.5682 I.0000 J-.8800 
G00 Z.8750

M05  (stop spindle)
M09  (all coolant off)
G00 X0.0 Y0.0

M30  (end with rewind)


----------



## rdean (Apr 23, 2016)

It is hard to tell much from just g-code but I ran it anyway in Mach3. 
No problems found the code ran fine and the center cut is at 0,0.
Will do a little more checking later.

Ray


----------



## JimDawson (Apr 23, 2016)

Another thought is to change the the D2nc arc center mode to Absolute rather than Incremental.

Because the hole center is 0,0, you might get away with changing the following line

G50  (reset scale 1:1)
*G91.1 (IJ relative arcs) *change to* G91 (IJ absolute arcs)*
G20  (inch mode)

Not sure how that would affect things


----------



## TomS (Apr 23, 2016)

Thanks to both of you for the help.  I'm not in the shop until later today but will try out your suggestions and report back on what I find out.

Tom S.


----------



## jbolt (Apr 23, 2016)

TomS said:


> Mostly "UC100 not found" and program stops running gcode midway through a cycle.  Maybe it's time to reload Mach.
> 
> Tom S.



That is a UC100 issue. That is why I moved away from the UC100 on my mill and on to a Smooth Stepper. I put the UC100 on my router and have the same issues. That will soon get a smooth stepper board.


----------



## TomS (Apr 23, 2016)

jbolt said:


> That is a UC100 issue. That is why I moved away from the UC100 on my mill and on to a Smooth Stepper. I put the UC100 on my router and have the same issues. That will soon get a smooth stepper board.



I was thinking it was "noise" related.  Which smooth stepper did you go with?

Tom S.


----------



## TomS (Apr 23, 2016)

JimDawson said:


> Another thought is to change the the D2nc arc center mode to Absolute rather than Incremental.
> 
> Because the hole center is 0,0, you might get away with changing the following line
> 
> ...



Made a few test runs.  Didn't go well.  I added "X-.0321" to the line as suggested.  The bore chamfer cut still not concentric to the bore.  The perimeter chamfer cut looks fine.  Next test I changed G91.1 to G91.  Got the following error message, "radius to end of arc differs from radius to start.  Block G02 X-1.475 Y-1.5780 Z-.029 I.0000 J.1250".  Don't know what this means.  I removed X-.0321 from the line in the first test.  The error message did not go away which is what I expected.  Changed back to G91.1 and the error message didn't reappear.  Again, what I expected.  

My intuition is telling me Mach is misinterpreting the gcode generated by my CAM program.  Contemplating loading Mach version 062 to see if the problem goes away.  Have any thoughts?

Tom S.


----------



## rdean (Apr 23, 2016)

I recommend the Ethernet model ESS from Warp9 or CNC4pc.  I have used it several times with no problems.

Ray


----------



## jbolt (Apr 23, 2016)

I have the ESS from Warp9. I use it with a PMDX-126 BoB and PMDX-107 spindle control board.


----------



## JimDawson (Apr 23, 2016)

I think you're right, sounds like a Mach3 issue.  I don't have an answer for you.


----------



## jbolt (Apr 23, 2016)

Can you send me your dfx file? I would like to create a tool path on my program and see how it compares.


----------



## jumps4 (Apr 24, 2016)

I would start by getting a different version of mach3
.066 is junk so no matter what you should start there.
I'm using Version R3.043.057 without issue. the latter versions of mach3
were trying to fix lathe and the more they worked on lathe the worse mill got.
before installing an older version, make copies of your .xml files
after installing the earlier version, copy the .xml files you saved back into mach3 and you
will not have lost your settings.
uc100 may or may not have to be reinstalled,  I can't remember
link to previous versions :                     
ftp://machsupport.com/Mach3/
Steve


----------



## TomS (Apr 24, 2016)

jbolt said:


> Can you send me your dfx file? I would like to create a tool path on my program and see how it compares.



Here you go.  I couldn't upload the dxf file so I changed the extension to txt.  You should be able to change it back to dxf and load it.  

Tom S.


----------



## TomS (Apr 24, 2016)

JimDawson said:


> I think you're right, sounds like a Mach3 issue.  I don't have an answer for you.



Thanks for your help Jim.  I'll load version 062 and see if that solves the problem.

Tom S.


----------



## TomS (Apr 24, 2016)

jumps4 said:


> I would start by getting a different version of mach3
> .066 is junk so no matter what you should start there.
> I'm using Version R3.043.057 without issue. the latter versions of mach3
> were trying to fix lathe and the more they worked on lathe the worse mill got.
> ...



I'll give it a try.  Thanks.

Tom S.


----------



## jbolt (Apr 24, 2016)

TomS said:


> Here you go.  I couldn't upload the dxf file so I changed the extension to txt.  You should be able to change it back to dxf and load it.
> 
> Tom S.



Unfortunately that did not work. 

I ran your code last night on a scrap of MDF but without dimensions I cant say if the center circle is correctly placed in the X axis. It is round and centered in the Y axis. The measurements I get (roughly) are 0.55" between the flat outer edge and the circle edge and 0.6" from the radius outer edge to the circle edge. The circle is 1.73".


----------



## rdean (Apr 24, 2016)

I imported the dxf file in to my software and centered it in the work piece.  The outside profile is centered but the center hole in off  in X by -0.0321

These are the measurements returned by my software as I have seen issues with importing dxf files in the past I will post them here.
X 2.7002"
Y 3.156
Center diameter 2.01


If you wanted the center vector in the center of the piece than there is your problem if not then never mind.

Ray


----------



## JimDawson (Apr 24, 2016)

Is this what your part looks like?  I get 0.0642 arc center offset (outside arc center to hole center), the hole center is offset to the left from the arc center.  I wonder if the CAM program is picking up the wrong center?


----------



## TomS (Apr 24, 2016)

JimDawson said:


> Is this what your part looks like?  I get 0.0642 arc center offset (outside arc center to hole center), the hole center is offset to the left from the arc center.  I wonder if the CAM program is picking up the wrong center?
> 
> View attachment 127687



Yes, this is the same as my drawing.  Below is a screen shot of my fixture.  I use an indicator to locate the spindle central to the spigot, e.g. X = 0 and Y = 0.  I then clamp my part to the fixture then machine the profile.  Next I chamfer the periphery then the bore.  All operations are based on the original X and Y reference.  Could be my CAM program is picking up the both center points but I don't know why.

Tom S.


----------



## TomS (Apr 24, 2016)

rdean said:


> I imported the dxf file in to my software and centered it in the work piece.  The outside profile is centered but the center hole in off  in X by -0.0321
> 
> These are the measurements returned by my software as I have seen issues with importing dxf files in the past I will post them here.
> X 2.7002"
> ...



This could be the problem.  I need to look at my drawing again.  This could all be related to the way I built the drawing.

Tom S.


----------



## TomS (Apr 24, 2016)

jbolt said:


> Unfortunately that did not work.
> 
> I ran your code last night on a scrap of MDF but without dimensions I cant say if the center circle is correctly placed in the X axis. It is round and centered in the Y axis. The measurements I get (roughly) are 0.55" between the flat outer edge and the circle edge and 0.6" from the radius outer edge to the circle edge. The circle is 1.73".



Jay - The drawing that Jim posted is correct.  Thanks for looking.

Tom S.


----------



## JimDawson (Apr 25, 2016)

I figured out the tool size and the rest of the parameters from the G-code you posted.

Attached is G-code from your DXF and my CAM program, using a Mach3 post processor.  Give it a try, but make an air cut before you try to make chips just to make sure it behaves.


----------



## TomS (Apr 25, 2016)

JimDawson said:


> I figured out the tool size and the rest of the parameters from the G-code you posted.
> 
> Attached is G-code from your DXF and my CAM program, using a Mach3 post processor.  Give it a try, but make an air cut before you try to make chips just to make sure it behaves.



Will do.


----------



## TomS (Apr 25, 2016)

JimDawson said:


> I figured out the tool size and the rest of the parameters from the G-code you posted.
> 
> Attached is G-code from your DXF and my CAM program, using a Mach3 post processor.  Give it a try, but make an air cut before you try to make chips just to make sure it behaves.



Today was a long day.  Started by upgrading D2NC to the latest version and uploading Mach 3 ver. 057 as Steve recommended.  Was ready to plug my computer back into the system when my son-in-law showed up with chainsaw in hand.  He's been promising for three months to help me cut down a couple of dead weeping willows on my property.  Couldn't say no so we spent most of the day cutting trees and cleaning up brush.  Got back to the computer late this afternoon and fired it up and got the dreaded "UC100 not found" error message.  I reloaded the plugin and USB drivers and still no luck.  Played around with it for about an hour and traced the problem to either a dead port in the USB hub or a bad cable.  Didn't take the time to figure out the root cause but solved the problem by running a cable from the UC100 directly to my computer.  Haven't had this much fun since my last root canal.    

I loaded your gcode and did an "air cut".  The cutter path was concentric with the bore but not with the periphery.  I loaded my gcode and no change.  Still cut concentric with the periphery but not with the bore.  So this rules out a Mach 3 problem.  I'm convinced the problem is with the way I created the CAD drawing.  I started with a rectangle to create the basic shape.  Then I added a circle as the basis for the bore and perimeter arc that is offset from the rectangle center point.  For some reason D2NC is picking up the rectangle center for chamfering the periphery and bore but because the bore center is offset from the rectangle center it is also chamfering off center.  I have a work around in mind and will test it out in the next couple of days.

Thanks to you Jim, Steve, rdean and Jay for your help.  Couldn't have figured it out without you guys.

Tom S.


----------



## JimDawson (Apr 26, 2016)

TomS said:


> The cutter path was concentric with the bore but not with the periphery. I loaded my gcode and no change. Still cut concentric with the periphery but not with the bore.



The drawing shows the bore center and arc center in two different places.  Are you sure the part actually matches the drawing?


----------



## TomS (Apr 26, 2016)

JimDawson said:


> The drawing shows the bore center and arc center in two different places.  Are you sure the part actually matches the drawing?



I'm not sure the part matches the drawing.  I need to measure the part.  I'll do that in the next couple of days.

Tom S.


----------



## TomS (Apr 28, 2016)

TomS said:


> I'm not sure the part matches the drawing.  I need to measure the part.  I'll do that in the next couple of days.
> 
> Tom S.



To put closure to this dilemma this is what I found and what I surmise.  My part measures up the same as my and your drawing within a few thousanths.  This leads me to believe it's not a drawing issue.  That doesn't mean I won't keep this in mind next time I make a drawing with more than one center point.  My guess is that my CAM software got confused and generated gcode for the exterior machining based on one center point and generated another set of gcode for the bore chamfer using the other center point.

BTW - I posted a few pictures of the final product in the Pictures of Things Made in Home Shop CNC section of this forum.

Again, thanks to everyone for their comments and suggestions.

Tom S.


----------



## jbolt (Apr 29, 2016)

I have only used d2nc a few times so I'm not too familiar with the settings. Can you change the tool path entry from a ramp to a plunge and see if it changes the result? The tool path should be based off the vector. Maybe a bug in the software? Might be something to ask the developer about.


----------



## TomS (Apr 30, 2016)

jbolt said:


> I have only used d2nc a few times so I'm not too familiar with the settings. Can you change the tool path entry from a ramp to a plunge and see if it changes the result? The tool path should be based off the vector. Maybe a bug in the software? Might be something to ask the developer about.



I tried a plunge entry and had the same result.  I have to believe it's a software glitch.  I'll pass it along to D2NC and see what they have to say.

Tom S.


----------



## chevydyl (May 1, 2016)

Did you give dimensions to everything? So that the model is fully defined? Not sure it will matter.


----------



## TomS (May 1, 2016)

chevydyl said:


> Did you give dimensions to everything? So that the model is fully defined? Not sure it will matter.



Yes I did.  Still don't know why it did what it did but using a work around I was able to finish the parts.  You can see the results in "Pictures in the Home CNC Shop".

Tom S.


----------



## countryguy (May 2, 2016)

that is a good tip! thanks.  chasing gremlins gets so old.  Appreciate the 062 notice .



rdean said:


> Not an answer to your problem but version 066 has many issues.
> 062 is the most recommended version and will save you some problems later.
> 
> Ray


----------



## TomS (May 2, 2016)

countryguy said:


> that is a good tip! thanks.  chasing gremlins gets so old.  Appreciate the 062 notice .



Actually I loaded version 057 on the recommendation from jumps4.  His comment was, " they were trying to fix lathe and the more they worked on lathe the worse mill got."

Tom S.


----------

