System information

SECTION SIX - PARAMETRIC PROGRAMMING
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)
H43 H1 D1
G0 X [P1/2+.5] Y0 (Move past the diameter +.5)
Z[P2] (To the Z depth)
P81=7 (Set byte parameter special flags to shut off trig help and cutter
compensation)
POPEN P0 (Open file for output. Set report file to c:/parts/O0100.)
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.0360Y0.0906
X1.1030Y0.1945
X1.1301Y0.3028
X1.0525Y0.3831
X0.9516Y0.4437
344