Sample Programs
The following illustrates the parametric program for cutting five 45° segments of a fan blade.
P2=0
N2 P1=.5
P140=.1 G31
N1
G0 X[P1] Y0
G1 Z0
G3 R[P1] AA0 AB45 Z[[.5-P1]⁄5]
G31 P1=P1+.1
IF P1 LE 2 GOTO 1
P2=P2+72
G68 AA[P2] I0 J0
IF P2 LE 360 GOTO 2
In the above example, the tool makes sixteen passes for each blade starting at X.5 to X2 in .1”
steps. Z is 0 on the entire front edge of the blade and drops to 0 on the first pass and to -.3” on
the last pass. Each blade sweep is 45°. The N1-GOTO 1 loop is for each fan blade. The N2-
GOTO 2 loop rotates each blade by an additional 72°. P1 controls the sweep radius and Z depth.
P2 controls the rotation angle.
Sample Program Using Some Special Statements
(Outside digitizing program. Assumes the center is 0,0.)
INPUT (Diameter) P1
INPUT (Z depth) P2
INPUT (Angle increment) P3
TI M6 (Probe)
G43 H1 D1
G0 X [P1⁄2+.5] Y0 (Move past the diameter +.5)
Z[P2] (To the Z depth)
DPRNT [(Dig file for #1 diameter @ Z#2)]
DPRNT [S1500 M3]
DPRNT [X#208 Y#209]
DPRNT [Z#210]
P4=0 (Degree counter)
N1
G1 F20 PROBE1 X0 Y0 (Move toward the center until probe touches)
DPRNT [X#208 Y#209] (Write current X and Y dimensions out to file)
PROBE 2 XC0 YC0 R[P1⁄2+.5] AB[P4] (Move away from the part until probe releases.)
P4=P4+P3 (Increment degrees)
XC0 YC0 R[SQRT[P208*P208+P209*P209]] AB[P4] (Move over)
PROBE 2 XC0 YC0 R[P1⁄2+.5] AB[P4] (Move away just in case we are touching.)
IF P4<=360 GOTO 1 (Do 360°)
G0 Z1 (Z up)
DPRNT [Z1]
DPRNT [M5]
Sample Output from the Parametric Program
(Dig file for 4.0000 diameter @ Z-1.0000)
S1500 M3
X2.5000Y0.0000
Z-1.0000
X1.0500Y0.0000
X1.1030Y0.1945
X1.1301Y0.3028
X1.0525Y0.3831
.
.
.
X1.0149Y-0.3694
X1.0301Y-0.3028
X1.0560Y-0.0924
X1.13000Y-0.0000
Z1
M5