;Feeds and Speeds Test Routine - Written by PS - 3 Dec 2020
;Goal of this test routine is to easily determine most efficient feedrate and depth of cut
;without skipping steps in the x-axis.
;------------------------------------------------------------
;Declare Variables
;------------------------------------------------------------
;Test variables, change these between tests
%FEEDRATE = 600 ;Feedrate to test (mm/min)
%FEEDRATESTEP = 200 ;Feedrate step increase for each additional cut (mm/min)
%DOC = 3 ;Depth of cut (mm)
;Common variables, not changed between tests. Set these as appropriate to machine and bit being used.
%PLUNGE = 480 ;Plunge rate (mm/min)
%TRAVELRATE = 2400 ;Travel speed to reposition (mm/min)
%ZCLEARANCE = 10 ;Z Height above test piece between cuts
%XCLEARANCE = 5 ;X Clearance from left side of test piece to avoid plunge through material before cut, function of bit diameter
%CUTOFFSET = 6 ;Distance to move in Y-axis between cuts
%CUTLENGTH = 50 ;Length of cut along X-axis
;------------------------------------------------------------
;Test sequence description
;------------------------------------------------------------
;Manually move bit to the top lower left corner of test piece
;Start router
;Define this as [0,0,0]
;Move so bit is here on test piece:
; ┌─────────┐
; │ │
; │ │
; │ │
; │ │
; │ │
; *│ │
; └─────────┘
;Make 5 cuts at faster and faster feedrates
;Cut 1: X-Axis at initial feedrate
;Cut 2: X-Axis at initial feedrate + feedrate step
;Cut 3: X-Axis at initial feedrate + 2X feedrate step
;Cut 4: X-Axis at initial feedrate + 3X feedrate step
;Cut 5: X-Axis at initial feedrate + 4X feedrate step
;Move back to XY of 5th cut, Z at test piece surface
;To continue with additional set of tests, change test variables and rerun macro.
;------------------------------------------------------------
;Test macro
;------------------------------------------------------------
G91 ;relative positioning
G21 ;set units to mm
G92 X0 Y0 Z0 ;define current position as [0,0,0]
G1 Z[ZCLEARANCE] F[PLUNGERATE] ;raise above test piece
G1 X[-XCLEARANCE] Y[CUTOFFSET] F[TRAVELRATE] ;move to XY of start point of cut
;first cut
G1 Z[-ZCLEARANCE-DOC] F[PLUNGERATE] ;drop to depth of cut
G1 X[CUTLENGTH] F[FEEDRATE] ;move through cut
G1 Z[ZCLEARANCE+DOC] F[PLUNGERATE] ;raise above test piece
G1 X[-CUTLENGTH] Y[CUTOFFSET] F[TRAVELRATE] ;move to XY of start point of cut
;second cut
G1 Z[-ZCLEARANCE-DOC] F[PLUNGERATE] ;drop to depth of cut
G1 X[CUTLENGTH] F[FEEDRATE+FEEDRATESTEP] ;move through cut
G1 Z[ZCLEARANCE+DOC] F[PLUNGERATE] ;raise above test piece
G1 X[-CUTLENGTH] Y[CUTOFFSET] F[TRAVELRATE] ;move to XY of start point of cut
;third cut
G1 Z[-ZCLEARANCE-DOC] F[PLUNGERATE] ;drop to depth of cut
G1 X[CUTLENGTH] F[FEEDRATE+2*FEEDRATESTEP] ;move through cut
G1 Z[ZCLEARANCE+DOC] F[PLUNGERATE] ;raise above test piece
G1 X[-CUTLENGTH] Y[CUTOFFSET] F[TRAVELRATE] ;move to XY of start point of cut
;fourth cut
G1 Z[-ZCLEARANCE-DOC] F[PLUNGERATE] ;drop to depth of cut
G1 X[CUTLENGTH] F[FEEDRATE+3*FEEDRATESTEP] ;move through cut
G1 Z[ZCLEARANCE+DOC] F[PLUNGERATE] ;raise above test piece
G1 X[-CUTLENGTH] Y[CUTOFFSET] F[TRAVELRATE] ;move to XY of start point of cut
;fifth cut
G1 Z[-ZCLEARANCE-DOC] F[PLUNGERATE] ;drop to depth of cut
G1 X[CUTLENGTH] F[FEEDRATE+4*FEEDRATESTEP] ;move through cut
G1 Z[ZCLEARANCE+DOC] F[PLUNGERATE] ;raise above test piece
G1 X[-CUTLENGTH] F[TRAVELRATE] ;move to X of start point of cut
;Move to potential start position of next test
G1 X[XCLEARANCE] F[TRAVELRATE] ;while at Y position of last cut, move to edge of test piece
G1 Z[-ZCLEARANCE] F[PLUNGERATE] ;move to top of test piece, now ready for next G92 X0 Y0 Z0 command