Hello Guest it is April 19, 2024, 01:21:34 PM

Author Topic: Strange error with Mach 3, Ok in NCPlot  (Read 4166 times)

0 Members and 1 Guest are viewing this topic.

Strange error with Mach 3, Ok in NCPlot
« on: January 06, 2011, 08:15:07 AM »
This code works in NCPlot, but Mach 3 tells me the radius at the end point is not the same as at the start.  I have the IJ Mode set to INC in config.

G20 (set the units to inches)
G17 (make arcs within the XY plane)
F10 (set feed rate in inches per minute)
G10 L1 P1 R.125 (set tool 1 radius to .125)
G41 D1 (cutter radius compensation tool 1 to the left of cut)
G91
G0 Z1
G0 X1
G0 Z-1
G0 X-1
G90
(start at 0,0,0)
G1 X2 (cut lower body)
G2 X2.125 Y-.125 J-.125 (cut CCW arc to  x2.125 Y-.125)  <this gives an error.
G3 X2.625 Y-.125 I.25  (cut CW arc to X2.625)
G1 Y.75 (cut beater end)
G3 X2.125 Y.75 I-.250 (cut CW arc to X2.125 Y.75)
G2 X2 Y.625 I-.125 (Cut CCW arc to X2 Y.625)

G1 X0
G1 Y0

M30

Can anyone see my error??

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: Strange error with Mach 3, Ok in NCPlot
« Reply #1 on: January 06, 2011, 10:24:39 AM »
at no point do you move to Y0 and also a G10 in inc mode increments the tool offset so the tool gets bigger the second time you run the code.

You also need to turn on the G41 comp on a G01 line after you rapid to the start point. You also need a G40 lead out at the end of the profile to cancel tool comp.

Graham
« Last Edit: January 06, 2011, 10:30:46 AM by Graham Waterworth »
Without engineers the world stops

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Strange error with Mach 3, Ok in NCPlot
« Reply #2 on: January 06, 2011, 10:32:05 AM »
Your basic profile code is correct with Inc IJ's BUT you have incorrectly used the G41 and it causes the code to fail.

Useing tool comp you MUST provide a correct lead in to the profile AND a correct leadout from the profile.   IF not then MACH tries to work with what is there and usaully fails or errors out.

Hope that helps, (;-) TP
Re: Strange error with Mach 3, Ok in NCPlot
« Reply #3 on: January 06, 2011, 12:12:10 PM »
Thanks for the quick answers.

Sorry to be so dense, but this is the first piece of G-code I have ever written.

I don't understand what "turn on the G41 comp on a G01 line" means.  Should that be:
G1 G41 D1 X2
?

Lead-in and lead out are the moves to let the tool compensation be active?  Can they be rapid moves?
 
Do you know where there is an explanation of how tool compensation works? I have the EMC2 G Code Language Reference.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Strange error with Mach 3, Ok in NCPlot
« Reply #4 on: January 06, 2011, 12:22:52 PM »
Look in the MACH manual.

The idea is to give the machine ROOM to actually do the comp before it gets to the cutting point. Then remove the comp as you finish.


Re: Strange error with Mach 3, Ok in NCPlot
« Reply #5 on: January 06, 2011, 03:45:06 PM »
Thanks for the info.  I did not delve into the manual:  did my setup from the videos. 

Doh!  Ya gotta RTFM I guess!