[Home]Lathe Code

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Lathe support on other controls

This page does NOT describe how LinuxCNC works. Instead, it describes how other controls work. In some cases, LinuxCNC may work similarly to the descriptions below. In other cases, it will work entirely differently.

Contents

1. Introduction
2. Lathe G codes
2.1. DesktopCNC
2.2. Haas Lathe Codes
2.3. OKUMA OSP 2200 ('80 vintage)
3. Threading
3.1. Mitsubishi G33
3.2. SIEMENS 840D, EMCO Variant
3.3. OKUMA OSP 2200 ('80 vintage)
3.4. Add other versions of G33
4. Multi-pass Thread Cutting Canned Cycle
4.1. This is a Fanuc style canned cycle
4.2. Macro Canned Cycle
5. Constant Surface Speed
6. Sample Threading Programs
6.1. Synergy 1/4-20 thread program
6.2. Roltek Sample Threading Program
7. Mastercam Threading Parameters Pages

1. Introduction

CNC lathe operation has been a topic of discussion as long as rayh and probably mshaver have been hanging around this software. This page is designed to provide a comprehensive set of specifications for this essential ability.

2. Lathe G codes

There are a number of different sets of codes used by cnc makers to handle lathe specific operations. Included are those from a couple of sources. These are not meant to be overwhelming. They are intended to show the range of operations possible on common commercial lathes. As we begin to build in lathe functionality, we need to do it in a way that permits the expansion of functionality without the need to rewrite earlier abilities.

2.1. DesktopCNC?

This is from a list at http://www.desktopcnc.com/g_code_lathe.htm

G32 is used for Plain Threading Cycle
G33 Threadcutting, constant lead
G34 Threadcutting, increasing lead
G35 Threadcutting, decreasing lead

G46 is used for Turning Canned Cycle
G47 is used for Facing Canned Cycle
G66 is used for Stock Removal Roughing
G67 is used for Stock Removal Finishing
G76 is used for Canned Cycle, Thread Cutting Cycle

G70 is used for Canned Cycle, Finishing Cycle
G71 is used for Canned Cycle, OD Roughing Cycle
G72 is used for Canned Cycle, Face Roughing Cycle
G73 is used for Canned Cycle, Profiling Cycle
G74 is used for Canned Cycle, Face Grooving Cycle
G75 is used for Canned Cycle, OD Grooving Cycle
G90 is used for Cutting Cycle A
G92 is used for Thread Cutting Cycle
G94 is used for Cutting Cycle B

M10 Clamp
M11 Unclamp
M12 Synchronization Code
M19 Oriented Spindle Stop

2.2. Haas Lathe Codes

G00* RAPID POSITIONING MOTION (X,Z,U,W,B) (SETTING 10, 101)
G01 LINEAR INTERPOLATION MOTION (X,Z,U,W,B,F)
G01 CHAMFERING AND CORNER ROUNDING (X,Z,U,W,B,I,K,R,A,F)
G02 CW CIRCULAR INTERPOLATION MOTION (X,Z,U,W,I,K,R,F)
G03 CCW CIRCULAR INTERPOLATION MOTION (X,Z,U,W,I,K,R,F)
G04 DWELL (P) (P=seconds”.”milliseconds)
G05** FINE SPINDLE CONTROL MOTION (X,Z,U,W,R,F) (LIVE TOOLING)
G09 EXACT STOP, NON-MODAL
G10 PROGRAMMABLE OFFSET SETTING (X,Z,U,W,L,P,Q,R)
G14** MAIN-SPINDLE SHIFT TO SUB-SPINDLE
G15** MAIN-SPINDLE SHIFT TO SUB-SPINDLE CANCEL
G17** CIRCULAR MOTION XY PLANE SELECTION (G02,G03) (LIVE TOOLING)
G18* CIRCULAR MOTION ZX PLANE SELECTION (G02,G03) (SETTING 56)
G19** CIRCULAR MOTION YZ PLANE SELECTION (G02,G03) (LIVE TOOLING)
G20* VERIFY INCH COORDINATE POSITIONING (SETTING 9 needs to be INCH)
G21 VERIFY METRIC COORDINATE POSITIONING (SETTING 9 needs to be METRIC)
G28 MACHINE ZERO RETURN THRU REF. POINT (X,Z,U,W,B) (Fanuc)
G29 MOVE TO LOCATION THROUGH G29 REF. POINT (X,Z) (Fanuc)
G31** FEED UNTIL SKIP FUNCTION (X,Z,U,W,F)
G32 THREAD CUTTING PATH, MODAL (X,Z,U,W,F)
G40* TOOL NOSE COMPENSATION CANCEL G41/G42 (X,Z,U,W,I,K) (SETTING 56)
G41 TOOL NOSE COMPENSATION, LEFT (X,Z,U,W) (SETTING 43, 44, 58)
G42 TOOL NOSE COMPENSATION, RIGHT (X,Z,U,W) (SETTING 43, 44, 58)
G50 SPINDLE SPEED MAXIMUM RPM LIMIT (S)
G51 RETURN TO MACHINE ZERO, CANCEL OFFSET (Yasnac)
G52 WORK OFFSET COORDINATE POSITIONING (Yasnac)
G52 GLOBAL WORK COORDINATE SYSTEM SHIFT (Fanuc)
G53 MACHINE COORDINATE POSITIONING, NON-MODAL (X,Z,B)
G54* WORK OFFSET COORDINATE POSITIONING #1 (SETTING 56)
G55 WORK OFFSET COORDINATE POSITIONING #2
G56 WORK OFFSET COORDINATE POSITIONING #3
G57 WORK OFFSET COORDINATE POSITIONING #4
G58 WORK OFFSET COORDINATE POSITIONING #5
G59 WORK OFFSET COORDINATE POSITIONING #6
G61 EXACT STOP, MODAL (X,Z)
G64* EXACT STOP G61 CANCEL (SETTING 56)
G65** MACRO SUB-ROUTINE CALL
G70 FINISHING CYCLE (P,Q)
G71 O.D. / I.D. STOCK REMOVAL CYCLE (P,Q,U,W,I,K,D,S,T,R1,F) (SETTING 72, 73)
G72 END FACE STOCK REMOVAL CYCLE (P,Q,U,W,I,K,D,S,T,R1,F) (SETTING 72, 73)
G73 IRREGULAR PATH STOCK REMOVAL CYCLE (P,Q,U,W,I,K,D,S,T,F)
G74 FACE GROOVING, or HIGH SPEED PECK DRILL CYCLE (X,Z,U,W,I,K,D,F) (SETTING 22)
G75 O.D. / I.D. PECK GROOVING CYCLE, (X,Z,U,W,I,K,D,F) (SETTING 22)
G76 THREAD CUTTING CYCLE, MULTIPLE PASS (X,Z,U,W,I,K,A,D,F) (SETTING 86, 95, 96, 99)
G77** FLATTING CYCLE (I,J,L,R,S,K) (LIVE TOOLING)
G80* CANCEL CANNED CYCLE (SETTING 56)
G81 DRILL CANNED CYCLE (X,Z,W,R,F)
G82 SPOT DRILL / COUNTERBORE CANNED CYCLE (X,Z,W,P,R,F)
G83 PECK DRILLING CANNED CYCLE (X,Z,W,I,J,K,Q,P,R,F) (SETTING 22, 52)
G84 TAPPING CANNED CYCLE (X,Z,W,R,F)
G85 BORE IN, BORE OUT CANNED CYCLE (X,Z,U,W,R,L,F)
G86 BORE IN, STOP, RAPID OUT CANNED CYCLE (X,Z,U,W,R,L,F)
G87 BORE IN, STOP, MANUAL RETRACT CANNED CYCLE (X,Z,U,W,R,L,F)
G88 BORE IN, DWELL, MANUAL RETRACT CANNED CYCLE (X,Z,U,W,P,R,L,F)
G89 BORE IN, DWELL, BORE OUT CANNED CYCLE (X,Z,U,W,P,R,L,F)
G90 O.D. / I.D. TURNING CYCLE, MODAL (X,Z,U,W,I,F)
G92 THREADING CYCLE, MODAL (X,Z,U,W,I,F) (SETTING 95, 96)
G94 END FACING CYCLE, MODAL (X,Z,U,W,K,F)
G95** END FACE LIVE TOOLING RIGID TAP (X,Z,W,R,F)
G96 CONSTANT SURFACE SPEED, CSS ON (S)
G97* CONSTANT NON-VARYING SPINDLE SPEED, CSS OFF (S) (SETTING 56)
G98 FEED PER MINUTE (F)
G99* FEED PER REVOLUTION (F) (SETTING 56)
G100 MIRROR IMAGE CANCEL G101
G101 MIRROR IMAGE (X,Z) (SETTING 45, 47)
G102 PROGRAMMABLE OUTPUT TO RS-232 (X,Z)
G103 LIMIT BLOCK LOOKAHEAD (P0 - P15 max. for number control looks ahead)
G105 SERVO BAR COMMAND
G110-G111 WORK OFFSET COORDINATE POSITIONING #7- #8
G112** CARTESIAN TO POLAR TRANSFORMATION
G113** CARTESIAN TO POLAR TRANSFORMATION CANCEL
G114-G129 WORK OFFSET COORDINATE POSITIONING #9 - #24
G159** BACKGROUND PICKUP / PART RETURN
G160** APL AXIS COMMAND MODE ON
G161** APL AXIS COMMAND MODE OFF
G184 REVERSE TAPPING CANNED CYCLE (X,Z,W,R,F) (SETTING 130)
G187 ACCURACY CONTROL FOR HIGH SPEED MACHINING (E) (SETTING 85)
G194 SUB-SPINDLE / TAPPING CANNED CYCLE
G195 LIVE TOOLING VECTOR TAPPING (X,F)
G196 LIVE TOOLING VECTOR TAPPING REVERSE (X,F)
G200 INDEX ON THE FLY (X,Z,U,W,T)

M00 PROGRAM STOP (SETTING 42, 101)
M01 OPTIONAL PROGRAM STOP (SETTING 17)
M02 PROGRAM END
M03 SPINDLE ON FORWARD (S) (SETTING 144)
M04 SPINDLE ON REVERSE (S) (SETTING 144)
M05 SPINDLE STOP
M08 COOLANT ON (SETTING 32)
M09 COOLANT OFF
M10 CHUCK CLAMP (SETTING 92)
M11 CHUCK UNCLAMP (SETTING 92)
M12** AUTO AIR JET ON (P)
M13** AUTO AIR JET OFF
M14** MAIN SPINDLE CLAMP
M15** MAIN SPINDLE UNCLAMP
M17 ROTATE TURRET FORWARD (T) (SETTING 97)
M18 ROTATE TURRET REVERSE (T) (SETTING 97)
M19** ORIENT SPINDLE (P,R)
M21** TAILSTOCK ADVANCE (SETTING 93, 94, 106, 107, 121, 145)
M22** TAILSTOCK RETRACT (SETTING 105)
M23 ANGLE OUT OF THREAD ON (SETTING 95, 96)
M24 ANGLE OUT OF THREAD OFF
M30 PROGRAM END AND RESET (SETTING 2, 39, 56, 83)
M31 CHIP AUGER FORWARD (SETTING 114, 115)
M32 CHIP AUGER REVERSE (SETTING 114, 115)
M33 CHIP AUGER STOP
M36** PARTS CATCHER ON
M37** PARTS CATCHER OFF
M41 SPINDLE LOW GEAR OVERRIDE
M42 SPINDLE HIGH GEAR OVERRIDE
M43 TURRET UNLOCK (FOR SERVICE USE ONLY)
M44 TURRET LOCK (FOR SERVICE USE ONLY)
M51-M58 OPTIONAL USER M CODE SET
M59 OUTPUT RELAY SET (N)
M61-M68 OPTIONAL USER M CODE CLEAR
M69 OUTPUT RELAY CLEAR (N)
M76 PROGRAM DISPLAYS INACTIVE
M77 PROGRAM DISPLAYS ACTIVE
M78 ALARM IF SKIP SIGNAL FOUND
M79 ALARM IF SKIP SIGNAL NOT FOUND
M85** AUTOMATIC DOOR OPEN (SETTING 51, 131)
M86** AUTOMATIC DOOR CLOSE (SETTING 51, 131)
M88** HIGH PRESSURE COOLANT ON (SETTING 32)
M89** HIGH PRESSURE COOLANT OFF
M93** AXIS POSITION CAPTURE START (P,Q)
M94** AXIS POSITION CAPTURE STOP
M95 SLEEP MODE (hh:mm)
M96 JUMP IF NO SIGNAL (P,Q)
M97 LOCAL SUB-ROUTINE CALL (P,L)
M98 SUB-PROGRAM CALL (P,L)
M99 SUB-PROGRAM/ROUTINE RETURN OR LOOP (P) (SETTING 118)
M109** INTERACTIVE USER INPUT (P)
M110** TAILSTOCK CHUCK CLAMP (SETTING 122)
M111** TAILSTOCK CHUCK UNCLAMP (SETTING 122)
M119** SUB-SPINDLE ORIENT (P,R)
M121-M128 OPTIONAL USER M CODE INTERFACE WITH M-FIN SIGNAL
M133** LIVE TOOL DRIVE FORWARD (P)
M134** LIVE TOOL DRIVE REVERSE (P)
M135** LIVE TOOL DRIVE STOP
M143** SUB-SPINDLE FORWARD (P)
M144** SUB-SPINDLE REVERSE (P)
M145** SUB-SPINDLE STOP
M154** C AXIS ENGAGE (SETTING 102)
M155** C AXIS DISENGAGE
M164** ROTATE APL GRIPPERS TO "n" POSITION (Pn)
M165** OPEN APL GRIPPER 1 (RAW MATERIAL)
M166** CLOSE APL GRIPPER 1 (RAW MATERIAL)
M167** OPEN APL GRIPPER 2 (FINISHED MATERIAL)
M168** CLOSE APL GRIPPER 2 (FINISHED MATERIAL)

2.3. OKUMA OSP 2200 ('80 vintage)

3. Threading

3.1. Mitsubishi G33

Mitsubishi lists G33 for both thread cutting and tapping

They select either tpi or lead using a parameter elsewhere.

3.2. SIEMENS 840D, EMCO Variant

EMCO lists G33 for both thread cutting and tapping

3.3. OKUMA OSP 2200 ('80 vintage)

3.4. Add other versions of G33

please

4. Multi-pass Thread Cutting Canned Cycle

Single pass lathe threading is limited in cutting ability and requires a rather large diameter bar in order to cut without serious deflection. Most machine tool makers use canned cycles or macros in order to implement threading that cuts many times across the thread in order to produce the final threads. Below are several examples of ways to achieve multi-pass threading

4.1. This is a Fanuc style canned cycle

m = Number of finishing cuts r = Chamfering amount a = Angle of tool tip d min = Minimum cutting depth (specified in radius value) d = Finishing allowance (in radius value)

X = X axis destination Z = Z axis destination i = Taper value (in radius value) k = Height of thread (in radius value) dd= Depth of first cut (in radius value) l = Lead of thread

Example: G76 P010060 Q100 R200; G76 X60.64 Z-25. P3680 Q1800 F6.;

Cuts a thread with one finishing cut, no chamfer on the exit of the tool, with a tool tip angle of 60deg. It will have a minimim depth of cut of .1mm and will have a finishing allowance of .2mm. The minor diameter of the thread is 60.64mm and it will cut a thread 25mm long in the Z minus direction. The height of the thread is 3.68mm and the depth of the first cut is 1.8mm and the thread has a lead of 6mm. This thread is a straight thread with no taper.

(q and a borrowed from cad_cam_edm_dro group about 2002)

Are Q, R, I, and the second P always in the implied decimal format? Since Z, X, and F are decimalized, it seems kind of strange to mix the two in the same code - doubly so since retrofits have all kinds of different resolutions.

Yes for some reason Q,R,I and the 2nd P are as I put in the example, I don't know why but as I said all three Fanuc machines that I have use the same format. Possibly this could be changes in the parameters of the machine.

I'm a bit unclear the effect of the chamfering amount in the second two chars of the P word. Is the thread chamfered with the threading tool explicitly by the G76 cycle? Seems like one would want to to this with another tool, but I guess it could be pretty convenient though as part of the threading action. Or is this just "stay out" information so the cycle can be optimized?

The chamfering amount is on the retraction of the tool at the end of the thread. If you leave this amount at 00 the thread will end in a groove (no chamfer) but if you use 05 this will chamfer the thread out to the major diameter of the thread for a distance of 5mm.

4.2. Macro Canned Cycle

The following specification is from a company that wishes to remain nameless here. I'm told that this is the Swiss Army Knife of thread cutting systems. It used a common g33 call but repeated for the number of passes needed to cut and spring the threads to near perfect.

Gxxx LATHE THREAD CYCLE <OD/ID/TAPER/MULTIPLE-START/VARIABLE LEAD>

  Inch/Metric?
  Absolute G90 Mode Only
  With The Exception of M3/M4 No Other M or G Codes Allowed

  NOTE: CYCLE IS DEVELOPED FOR DIAMETER COMPENSATION, G41/G42 AND
        ENDS IN G40 MODE.
        CYCLE WILL POSITION Z AXIS (1) PITCH + .11 INCH, 2.76 MM
        BEFORE G33 IS ACTIVATED.

 Gxxx FORMAT:
 REQUIRED: Gxxx B..E..J..O..R..U..V..W..Z..
 OPTIONAL: N..Gxxx A..B..C..D..E..F..H..I..J..K..M..O..Q..R..S..U..V..
           W..X..Z..

    NOTE: Because of 80 character line limitation, it may be necessary to
          pass-in letter address values, in Two or More Lines. See below:
                                            ---    

FORMAT: N10 Gxxx A..B..C..D..E..F..H..I..J..K.. First line up to 80 characters

    N20 M..O..Q..R..S..U..V..W..X..Z..  Second line up to 80 characters

    NOTE: CYCLE WILL NOT EXECUTE AXIS MOTION UNTIL Z VALUE IS PASSED-IN.
          ALWAYS PASS-IN Z VALUE IN LAST LINE.

 LETTER ADDRESS ASSIGNMENTS:

 A = Infeed Angle. <10 Deg. Default>
 B = Number Of Rough Passes.
 C = Number Of Spring Passes. <0 Default>
 D = Variable Lead, Final Lead Value At End Of Thread. <Default E Value>
 E = Initial Lead Value At Beginning Of Thread. <Pitch>
 F = Positioning Feedrate. <Default Modal Rate>
 H = Number Of Thread Starts (1 Start Default)
 I = First Pass Incremental Depth. <Default Cycle Calculated Depth>
  NOTE:IF "I" IS PASSED IN, THEN ALL SUCCESSIVE ROUGH CUT DEPTHS WILL BE THE
      <TOTAL DEPTH-1ST DEPTH/NUMBER OF RGH. CUTS-1.=SUCCESSIVE DEPTHS>
       E.G. (.0625-.02/10.-2.)=.0047 FOR EACH SUCCESSIVE PASSES.
       IF "I" IS NOT PASSED IN, THEN ALL ROUGH CUT DEPTHS WILL BE CALCULATED
         BY CYCLE. <TOTAL DEPTH/SQUARE ROOT OF NUMBER OF CUTS=1ST DEPTH>
         <SQUARE ROOT OF LAST CUT+1. * 1ST DEPTH=SUCCESSIVE DEPTH>
       E.G. (.0625/SQRT(10.)=.0198) 1ST DEPTH
            SQRT(2)*.0198=.0280-.0198=.0080 2ND DEPTH
            SQRT(3)*.0198=.0343-.0280=.0063 3RD DEPTH, ETC.
 J = Finish Pass Incremental Depth.
 K = Plus Or Minus Taper Per Inch/Millimeter?. Plus Taper = +Z DIA. < -Z DIA.
     Example of Plus Taper    .75/ft = K,.75/12. or K.0625
     Example of Minus Taper  -.75/ft = K,-.75/12. or K-.0625
     <0 Taper Default>
     NOTE: CYCLE WILL CONVERT DIAMETER TAPER INTO RADIUS TAPER, <L811/2.>
 M = Spindle On, M3-CW/M4-CCW.
 O = Tool Orientation. 1, -1, 2, or -2.
     O =  1. OD Thread - Tool Tip +X Direction
     O = -1. ID Thread - Tool Tip +X Direction
     O =  2. OD Thread - Tool Tip -X Direction
     O = -2. ID Thread - Tool Tip -X Direction
 Q = Pull Out At End of Thread. <Default X Retract And One Rev. Feedrate>
     Q = 1.  X-Z Retract At 45 Degrees And Thread Lead Feedrate.
     NOTE: 45 DEGREE RETRACT, WILL POSITION Z AXIS PAST THE Z FINAL POSITION
           EQUAL TO THE DEPTH OF THREAD, PLUS L842 VALUE.
 R = X-axis Incremental Start/Retract? Clearance Distance From Starting Dia.
 S = Spindle Speed.
 U = Minor Diameter. <Smallest  Starting Dia.>
 V = Major Diameter. <Largest Starting Dia.>
 W = Z-axis Absolute Start Thread Position. <Thread Face>
 X = X-axis Absolute Center Position of Thread. <X0 Default>
 Z = Z-axis Final Absolute Thread Position.

 EXAMPLES OF CALL TO FOLLOW:

 #1) Turn a straight, single lead outside diameter thread, which has a major
     dia. of 5.0" and minor dia. of 4.5". Threads per inch equals 10. X axis
     clearance equals .1". A 45 deg. X-Z retract is required. 10 deg. infeed.
     8 rough passes, and 3 spring passes. First pass depth equals .05".
     Finish pass depth equals .01. The tool tip points in a plus X direction.
     The absolute position of thread depth is Z-1.5. The absolute position of
     thread start is Z0.

    CALL LINE:

    Gxxx B8. C3. E,1./10., I.05 J.01 O1. Q1. R.1 U4.5 V5. W0 Z-1.5

    NOTE: "I" first pass depth was passed-in equal to .05, therefore all
          successive passes will be of equal depth.

 #2) Same example as #1, but make this thread a minus .75 taper per foot.
     Create a (2) line call.

    CALL LINE:

    Gxxx B8. C3. E,1./10., I.05 J.01 K,-.75/12., O1. Q1. R.1 U4.5 V5.
    W0 Z-1.5

 #3) Same example as #1, but add 100 RPM spindle speed, CW direction, and
     make multiple start threads equal to 4 starts. Create a (2) line call.

    CALL LINE:

    Gxxx B8. C3. E,1./10., I.05 J.01 O1. H4. Q1. R.1 S100 M3
    U4.5 V5. W0 Z-1.5

 PARAMETER ASSIGNMENTS:
 Lx27 = Rough Pass Counter
 Lx28 = Spring Pass Counter
 Lx29 = Incremetal Clearance Z Ramp-on <Init L831+.01 inch>
 Lx30 = Z Axis Start G41/G42 Ramp-on
 Lx31 = Incremental Clearance Final Z Ramp-on Position <Init 1 Pitch +.1in.>
 Lx32 = Z Axis Start After Ramp-on
 Lx33 = Average Depth Of Successive Rough Passes
 Lx34 = Start/End? Taper Radius Factor
 Lx35 = G00/G01 Mode When Cycle Is Called
 Lx36 = X Axis Clearance Position At Start
 Lx37 = X Axis Cut Position At Start
 Lx38 = X Axis Cut Position At End
 Lx39 = X Axis Position At End Of 45 deg Out-feed
 Lx40 = Z Axis Position At End Of 45 deg Out-feed
 Lx41 = X Retract Position At End Point
 Lx42 = Incremental Clearance X Axis At End Of 45 deg Out-feed  <Init .01>
 Lx43 = X Axis Position At Ramp-on
 Lx44 = Z Axis Position Of End Point Relative To Infeed Angle
 Lx45 = Incremental Multiple Start Spindle Angle
 Lx46 = Multiple Thread Start Counter
 Lx47 = Spindle Angle Synchronization
 Lx48 = Tangent Function Of Infeed Angle
 Lx49 = X Directional Sign
 Lx50 = Z Directional Sign
 Lx51 = Cutter Left/Right? G41/G42 <While Cutting>
 Lx52 = Cutter Left/Right? G41/G42 <Retracting Cut>
 Lx53 = E-Word Value For 1 Spindle Rev., On Retract From Thread
 Lx54 = E-Word Value At Start Of G33
        L854=SQRT(SQ(initial lead)-2.*L831*L855)
 Lx55 = D-Word Value At Start Of G33
        L855=(SQ(final lead)-SQ(initial lead))/(2.*thread length)
 Lx56 = Calculated Depth Counter
 Lx57 = Accumulated Total Calculated Incremental Depth

5. Constant Surface Speed

Constant surface speed is an essential tool for the lathe programmer. It is used to improve surface finish when facing or when turning. There is a very quick but comprehensive pdf that introduces the use of it here. -- [CSS]

6. Sample Threading Programs

6.1. Synergy 1/4-20 thread program

Parameters

 Class name: American Standard Thread Class 2 External
 Class id number: 11114
 Name: 0.25-20_AS
 Type: External
 Tpi: 20
 Major diameter: 0.25
 Pitch diameter: 0.2175
 Minor diameter: 0.1959
 Angle of thread: 60
 Initial depth: 0.02
 cleanup passes: 2

Synergy Howto

To actually create the thread do these 4 steps after starting Synergy:

 1) Hit the Turn tab

 2) Tools->Read: Read in an OD threading tool Tools->Read Tool ( this is a loop so after you read the first one you have to CANCEL twice to stop reading )

 3) Macros->Threading: pick the tool, the thread type and the 0.25-20_AS file.
 Specify the start position in Z ( .1? ), End pos Z ( -1? ), it will ask Dia.
 but the answers are ignored ( I know, why ask, but it uses the std point input)

 4) Execute->Default Lathe: Give it prog. name ( prog ) and ID #( 1234 ), Home pos ( 5,5 )

 Edit->CNC Output: Gives you..

G-code Program

 %1234
( ****PROGRAM **** )
  (*** T0101 *** odthd.60deg_Q1 ***)
 N1G50X5.Z5.S1500
 N2G00T0101M38
 N3G96S410M08
 N4M03
 N5G0X.35Z-3.8986
 N6X.21
 N7G33Z-1.0031F.05
 N8G0X.35
 N9Z-3.8942
 N10X.1984
 N11G33Z-1.F.05
 N12G0X.35
 N13Z-3.8942
 N14X.196
 N15G33Z-1.F.05
 N16G0X.35
 N17Z-3.8942
 N18X.196
 N19G33Z-1.F.05
 N20G0X.35
 N21Z5.
 N22X20.
 N23G00T0100
 N24M09
 N25M30

Credit

 Bob Schuppel  * bobs@webersys.com * (262) 782-0181 * 
 Weber Systems * W134 N5514 Campbell Dr.* Menomonee Falls, WI 53051

6.2. Roltek Sample Threading Program

This program shows some modification of a 1/4-20 thread.

Fanuc post G-code program

 ( ****PROGRAM **** ) 
 (*** T0101 *** odthd.60deg_Q1 ***)
 %
 (1/4-20 THREAD)
 N0010 T0100(INDEXING TURRET TO TOOL)
 G50 S2000
 G96 S410 M3
 M8
 G0 X.35 Z.1 T0101(CALLING TOOL OFFSET ON 1ST RAPID MOVE)
 X.2231
 G32 Z-1. F.05
 G0 X.35
 Z.1
 X.2079
 G32 Z-1.F.05
 G0 X.35
 Z.1
 X.1959
 G32 Z-1.F.05
 G0 X.35
 Z.1
 (2 -SPRING PASSES AFTER FINAL DEPTH)
 X.1959
 G32 Z-1.F.05
 G0 X.35
 Z.1
 X.1959
 G32 Z-1.F.05
 G0 X.35
 G0 X5.0 Z.1
 M30
 %

Credit

Roltek

7. Mastercam Threading Parameters Pages


LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions
Last edited July 17, 2013 10:43 pm by KimK (diff)
Search:
Published under a Creative Commons License