Part: G-Code Programming Template for Heidenhain (w/ Subroutines) Filename: heid-code.txt Date/Time: Feb. 2, 2004 Programmer: Bill Hemphill Notes: Formatted for tab spacing at 10 and monospaced font (Courier) Drawing No.: As Required Target Mill: Heidenhain Heid Pgrm No.: 001 Set-up Instr: [this document] Tooling Reqd: As Required Material: As Required Revision History [Fill in as required] [Change Following as Required] FEED RATES SPNDL TOOL DESCRIPTION RAD PLUNGE XVERSE SPEED ----- -------------- ------ ----- ----- ----- #1 3/16 Dia 2-flute End Mill (1/2 Cut) 0.0938 020 096 3,000 #2 3/4 Dia 2-flute End Mill 0.375 010 080 1,000 #3 1/2 Dia 4-flute End Mill 0.250 040 300 1,800 #4 3/4 w/ .125R 4-flute End Mill 0.375 040 250 1,500 Setup Instr: Locate ABS X,Y = ___________ TLOs: Z = 0 at TOP of _____________ Tool Change Point (TCP): (-4.50 ,-4.50 ) Workpiece Change Point (WCP): ( 0.00 , 5.25 ) Loading Instructions and Tool Usage ---------------------------------------------------------------------------------------- Tool # Process Description ---------------------------------------------------------------------------------------- >>>> Install part and secure >>>> Set machine origin ____________ at X = 0 Y = 0 >>>> Set/Confirm ALL TLOs >>>> Position spindle to [-4.5, -4.5] (TCP) and load Tool #1 [Detail program logic and operator required tasks as required] ---------------------------------------------------------------------------------------- %001 G70 $ INCH N0010 G17 $ ESTAB XY W/ Z VERT N0020 G00 G40 G90 M25 $RPD AB QUILL UP,CXL OFFSETS $ TLOs Set ____________ by ___ N0031 G99 T1 L-2 R+0.0938 $ TLO TOOL #1 N0032 G99 T2 L-2 R+0.3750 $ TLO TOOL #2 N0049 G99 T49 L-2 R+0.005 $ Dummy Tool for Dwell N0105 L1 $ CALL SUBROUTINE #1 - Go to the Workpiece CHange Point (WCP) N0110 L10 $ CALL SUBROUTINE #10 - Do Something N0115 L20 $ CALL SUBROUTINE #20 - Do Something Else $ ---------------- Add Subroutines as desired &/or Required --------------------- N0199 M30 $ END OF MAIN PROGRAM - REWIND MEMORY { --------- SUBROUTINE #1 Go to Workpiece Change Point (WCP) USES: TOOL #49 (Dummy Tool for Dwell) CALLS: None ------------------------------------------------------------------------------------------- } N0200 G98 L1 $ START SUB #1 N0210 M25 $ CXL TLO/SPINDLE OFF/UP N0220 G00 G90 X0.00 Y5.25 $RPD ABS TO WCP N0230 G38 T49 $ LOAD TOOL #49 (Dwell) N0240 G98 L0 $ END SUB #1 { --------- SUBROUTINE #2 Go to Tool Change Point (TCP) USES: No Tools Specified CALLS: None ------------------------------------------------------------------------------------------- } N0250 G98 L2 $ START SUB #2 N0260 M25 $ CXL TLO/SPINDLE OFF/UP N0270 G00 G90 X-4.50 Y-4.50 $RPD ABS TO TCP N0280 G98 L0 $ END SUB #2 { ------ SUBROUTINE #10 Describe Function of subroutine here ---- USES: TOOL #x - Specify what tool(s) are used in this subroutine CALLS SUB #2 - Specify what sub(s) are called by this subroutine ------------------------------------------------------------------------------------------- } N1100 G98 L10 $ START SUB #10 N1105 L2 $ CALL SUB 2 - TCP N1110 G38 T1 $ LOAD TOOL #1 N1115 G00 G90 X-3.043 Y2.657 $RPD ABS TO START POINT ... INSERT CONTOURING COMMANDS HERE ... N1199 G98 L0 $ END SUB #10 { ------ SUBROUTINE #20 ANOTHER SUBROUTINE - SAY WHAT IT DOES HERE ---- USES: TOOL #2 CALLS SUB #1 & 2 ------------------------------------------------------------------------------------------- } N1200 G98 L20 $ START SUB #20 N1205 L2 $ CALL SUB 2 - TCP N1210 G38 T2 $ LOAD TOOL #2 N1215 G00 G90 X-2.1213 Y-2.1213 $ RP AB TO FIRST HOLE ... INSERT CONTOURING COMMANDS HERE ... N1285 L1 $ TO WCP N1299 G98 L0 $ END SUB #15 %001 G70