Wednesday, 26 December 2018

Easy Examples of Cutter Compensation

A description of my methods:
> G54 work piece offsets are used
> Tool table edits are done manually, don't forget to reload.
> Programmed to part drawing,  full radius compensation
> Linuxcnc with Axis GUI
> No tool changes so the D word will be used to read the tool table
    * using D word won't update the tool displayed in Axis.
       MDI a tool change if this is a distraction.
> No tool length (G43) offsets
> No G41.1 or G42.1, something about old dogs and new tricks   
> Cutting inches on a machine configured in inches.
> Ideal stock, no large amounts of excess stock, no obstacles.
> Running the programs in single-block simulation is the best and safest way to
   get a grasp of the concepts.

Outside cut
(1/2" end mill)
N1 G20 G17 G40 G49 G90
N2 G54
N3 G0 X-.75 Y-.75 Z1
N4 Z-.1
N5 G01 G41 x0 y0 D01 F60
N6 Y3
N7 X3
N8 Y0
N9 X0
N10 G40 X-.75 y-.75
N11 Z1
N12 M02

Outside cut description
N1 setting inches, XY plane, absolute positioning, cancelling tool length and   
      cutter comp
N2 read work piece coordinates
N3 get ready to approach, this needs to be a cutter radius or more away from
      intended start of the cut
N5 approach and enable cutter comp, D01 calls tool table
N6 start profile
N9 finished profile
N10 cancel comp with a lead-out 

Inside cut
 (1/2" end mill)
N1 G20 G40 G17 G49
N2 G54
N3 F30
N4 G00 x2 Y0 Z.5
N5 G41 X2.5 Y1 D01
N6 G1 Y2 Z-.1
N7 G3 X1.5 Y3 I-1
N8 G1 X0
N9 Y0
N10 X3
N11 Y3
N12 X1.5
N13 G3 X.5 Y2 J-1
N14 G1 G40 x1 Y1.5
N15 Z.5
N16 G0 X2 Y0
N17 M02

Inside cut description
N1  A safety block in case something unexpected is active.
N2  G54 is probably already active, better safe than sorry.
N4  Setting up for approach.
N5  Approach and kick-in comp, must travel at least one cutter radius, this is
       the  lead-in move.
       Look at the coordinate readout after the lead-in to see how G41 altered the
       path. Looking isn't necessary but may clarify the concept.
N6  A bit of a down ramp for the cutter.
N7  An arc to ease into the profile, (G3 or G2 can be used now as comp has been applied at N5)
N8  Starting the profile.
N12 Profile complete.
N13 Arcing away from the profile, can not be used as a comp cancel.
N14 Lead-out here while shutting off comp. (G2/G3 can't be a lead-out move)
N15 With lead-out complete the z will retract straight up.
N16 Go back where we started, this is optional.


An example from Linuxcnc Documentation
(1/2" end mill)
(this is crafty , maybe too clever if looking for a basic example)
G20
F30
G10 L1 P1 R.25 Z1  (alters the tool table)
T1 M6  
G00 Z0
G41 (call comp)
X4 Y3 (lead-in from tool change position, comp alters path)
G1 X5 Z-1  (ramping to Z depth)
G3 X6 Y4 J1 (arcing into contour)
G1 Y6  (contour starts)
X2
Y2
X6
Y4     (contour ends)
G3 X5 Y5 I-1   (arcing out of contour)
G0 Z0  (straight up, comp still active)
G40 (cancel comp)
G0 X1 Y1 (the lead-out, comp alters path)
T0 M6 (back to tool change position)
M2

A screen shot of Axis.  White is the outside example,  red is the inside example.
The gap between the red and white lines is 1/2",  the diameter of the cutter.

Pictures or it didn't happen.  The black is the outside example,  the arrows are the inside example.  Between the cuts in the top left area some remaining uncut material can be seen.  This should appear in all 4 corners but this is cheap plywood and the cutter was dull.

That's all for now.  Be aware there are lot's of potential gotcha's with G41/G42 due to 'look ahead' and gouging.  Linuxcnc is really anal on the gouging part,  that's a good thing I suppose.
  

No comments:

Post a Comment

Note: only a member of this blog may post a comment.