Acu-Rite CNC 3500i User Manual

Page of 472
404
11 G-Code Edit, Help, & Advanced Features
1
1
.4 A
d
v
a
nced Pr
ogr
a
mming
The pocket is milled with a side draft angle of three degrees. Z is set 
to a step-up increment of .02 in. #152 can be set to a desired value, 
perhaps to determine the finish on the sidewalls of the pocket. In this 
example, the pocket always has a depth of 1 in., and a draft angle of 3 
degrees. The side lengths and Z step may be changed.
To make this program totally independent, the Z depth and draft angle 
can be set to variables, and the additional calculations must then be 
made.
This program requires the length and width of a rectangle, the cut per 
side on the rectangle, and the number of passes around the rectangle. 
Variables #150 to #199 are read only. They can be set only in the main 
program. 
X0 Y0
M2
O100
LOOP((1/#103)+1);
* SET LOOP NUMBER (1 IN. DP / .02 
STEP) + 1
G91
* SET INCREMENTAL MODAL
G1 Y(-#102);
* MILL L.H. SIDE
X#101;
* MILL BOTTOM SIDE
Y#102;
* MILL R.H. SIDE
X(-#101);
* MILL TOP SIDE, BACK TO START 
POS'N
X(-#104) Y#104 Z#103;
* STEP UP/OVER IN X-Y AND Z
#101 = #101 + (#104*2);
* ADD STEPOVER TIMES 2 TO LONG 
SIDES
#102 = #102 + (#104*2);
* ADD STEPOVER TIMES 2 TO SHORT 
SIDES
END
* END LOOP
M99