Hello,

Could someone help me with creating a variable program In G code using variables #500 and above.

The part is a Tapered Roller for a Tapered Bearing.

i can send a pdf. of the print email me at [email protected]

Here is the code generated by smartcam for the part to be made

the variables i'm looking to use are.

1. length of part
2. Dia. and taper angle
3. back face radius driven by taper angle
4. corner radius
5. counterbore depth, dia. is driven by tool used
6. thru hole is driven by tool used
7. material is 8620 steel
8. i would like to create a straight roller with no back face radius also from this program by simply setting values to 0 or some value.

(MSG, 69556-3.EIA 1.25" X 2.35" TAPER ROLLER K069556-3M BHB 08/26/09)
G0 G18 G20 G40 G53 G80 G96 G99 G111


G30 U0
G30 W0
G99
G111
G50 S4000 R1
M901
N10 T1010.03 G96 S660 M4 R1 M8
(MSG, WALTER DWLNL 16 4 D HOLDER- FACING UP AND LEFT)
(MSG, ROUGH TURN LEAVING .015")
G0 Z0.1 X1.7
Z0.015
G1 X-0.062 F0.02
G0 Z0.1
X1.4537
G1 Z-2.63742
X1.5
G0 Z0.1 X1.7
X1.1538
G1 Z-0.00012
G3 X1.36004 Z-0.15036 I-0.05788 K-0.15024
G1 Z-0.18059
X1.35991 Z-0.18503
X1.21031 Z-2.63742
X1.4537
G0 Z0.1 X1.7
G30 U0
G30 W0
M1
G99
G111
G50 S4000 R1
M901
N20 T0202.01 G96 S700 M4 R1 M8
(MSG, WALTER DWLNL 16 4 D HOLDER- FACING UP AND LEFT)
(MSG, FINISH FACE AND TURN - HD1)
G0 Z0.1 X0.44625
Z0.05238
X0.42192
G1 X1.0904 Z-0.00656 F0.012
G3 X1.32991 Z-0.15378 I-0.02518 K-0.1428
G1 X1.17944 Z-2.62046
G0 Z-2.505 X1.37946
Z0.1
G30 U0
G30 W0
M1
G99
G111
G50 S4000 R1
M901
N30 T0606.01 G97 S3000 M3 R1 M8
(MSG, NINE-9 CHAMFER TOOL)
(MSG, SPOT FOR DRILL)
G0 Z0.1 X0.0
G1 Z-0.177 F0.0033
G0 Z0.1
G30 U0
G30 W0
M1
G99
G111
G50 S4000 R1
M901
N40 T1212.01 G96 S80 M3 R1 M8
(MSG, -J- (.277) HSS DRILL 2.4" MIN FLUTE LENGTH)
(MSG, DRILL THRU)
G0 Z0.0 X0.0
G1 Z-0.65 F0.003
G0 Z0.0
Z-0.6
G1 Z-0.85
G0 Z0.0
Z-0.8
G1 Z-1.05
G0 Z0.0
Z-1.0
G1 Z-1.25
G0 Z0.0
Z-1.2
G1 Z-1.45
G0 Z0.0
Z-1.4
G1 Z-1.65
G0 Z0.0
Z-1.6
G1 Z-1.85
G0 Z0.0
Z-1.8
G1 Z-2.05
G0 Z0.0
Z-2.0
G1 Z-2.25
G0 Z0.0
Z-2.2
G1 Z-2.45
G0 Z0.0
Z-2.4
G1 Z-2.49322
G0 Z0.0
G30 U0
G30 W0
M1
G99
G111
G50 S4000 R1
M901
N50 T0707.01 G96 S205 M3 R1 M8
(MSG, .625" C.E.M.)
(MSG, SPOTFACE PER PRINT)
G0 Z0.0 X0.0
G1 Z-0.037 F0.0016
G0 Z0.0
G30 U0
G30 W0
M1
G99
G111
G50 S4000 R1
M901
N60 T0303.01 G97 S1200 M3 R1 M8
(MSG, SECO CFML 100 05D W/SECO LCMF 160505-A187-MT CP500)
(SET Z TO RIGHT SIDE OF TOOL)
(MSG, BACK END RADIUS AND CUT-OFF- HD1)
G0 Z-2.355 X1.7
X1.52992
G1 X0.76071 F0.003
X1.48992
G0 Z-1.94426
X1.30695
G1 X1.19707 Z-2.25584
G3 X0.96071 Z-2.355 I-0.11818 K0.02084
G1 X-0.04
X1.48992
G0 X1.7
G30 U0
G30 W0
G28 B0
M1
M99