Sample Program Using Some Special Statements
(DIGITIZING PROGRAM)
M5
T0101
G00
Z15
INPUT (OUTER DIAMETER) P1 (prompt for data)
INPUT (INNER DIAMETER) P4
INPUT (PROBE INCREMENT) P5
DPRNT [REWRITE]
DPRNT [(WHEEL CUTTING)] (write data to file)
DPRNT [M42] (custom code for cutting program to shift to 2nd gear)
DPRNT [G0 Z2]
DPRNT [X#1] (X to outer diameter)
DPRNT [G99 F.01] (feeds to cut at)
DPRNT [G50 S1200] (speeds to cut at)
DPRNT [G96 S1200]
DPRNT [G1]
DPRNT [M3]
P157=P1 (set length and diameter for graphics)
P156=P142
G0 Z1
X[P1] (move to outer diameter to start digitizing)
G98
P2=P1 (X position)
G1 F20
N1
PROBE1 Z-6 (probe fast to the part)
PROBE2 Z1 (probe off the part)
F.5
PROBE1 Z-6 (probe slow to the part)
P3=P209*2 (X diameter = current X position *2)
DPRNT[G1 X#3 Z#208] (write current X and Z positions to file)
F5
P2=P2-P5 (subtract probe increment from current X position)
X[P2] (move over to next X position)
PROBE2 Z1 (move off part)
IF P2>P4 GOTO 1 (are we at the inner diameter yet?)
G0R.1 AB0 (retract the probe)
X6.0
Z10.
X17.25
DPRNT[G0R.1AB0] (retract for the cutting program)
DPRNT[X6]
DPRNT[Z10.]
DPRNT[M5]
DPRNT[X#1]
OUTPUT FROM THE DIGITIZING PROGRAM
(WHEEL CUTTING)
M42
G0 Z2
X16.4856
G99 F.01
G50 S1200
G96 S1200
G1
M3
G1 X16.4856Z-0.1214
G1 X16.4656Z-0.0931
G1 X16.4456Z-0.0752
G1 X16.4256Z-0.0614
G1 X16.4056Z-0.0500
G1 X16.3856Z-0.0404
G1 X16.3656Z-0.0318
G1 X16.3456Z-0.0246
.
.
.
G1 X6.1256Z-0.3276
G1 X6.1056Z-0.3258
G1 X6.0856Z-0.3241
G1 X6.0656Z-0.3224
G1 X6.0456Z-0.3206
G1 X6.0256Z-0.3189
G1 X6.0056Z-0.3172
G0R.1AB0
X6
Z10.
M5
X16.4856