584,874 active members*
5,189 visitors online*
Register for free
Login
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2013
    Posts
    37

    Thread Sections Help

    Does anyone out there have a good macro for doing thread sections? I have one that seems to work ok but it doesn't repeat. It will make a perfect part, and then it will make a part where the pitch on the first section is small because the threader is off in Z somehow and widens the threads out.

    Here is the one I'm using now. If any of you spot the problem I would be forever grateful.

    This is on a STAR SR-32J Fanuc 18i controls, but it should realistically work anywhere.

    O8001(G32 CONTINUOUS THREAD CYCLE INCH)
    (#500 Z START POSITION)
    (#501 Z END POSITION)
    (#502 MAJOR DIAMETER)
    (#503 MINOR DIAMETER)
    (#504 DEPTH OF FIRST CUT - RADIUS)
    (#505 PITCH IN INCHES)
    (#506 MINIMUM DEPTH OF CUT - RADIUS)

    (MAIN PROGRAM EXAMPLE)
    (5/8-20 THREAD)
    (1ST TURN)
    (FIRST THREAD)
    (T300)
    (S1000M3)
    (#500=0)
    (#501=.7)
    (#502=.625)
    (#503=.575)
    (#504=.01)
    (#505=.05)
    (#506=.001)
    (G0X.7Z-.05T3)
    (M98P8001)
    (SECOND TURN)
    (SECOND THREAD)
    (T300)
    (S1000M3)
    (#500=.7)
    (#501=1.4)
    (G0X.7Z-.05T3)
    (M98P8001)
    (AND SO ON)

    #100=[#502+.05](X START POINT)
    #101=[#502-[#504*2]](X DEPTH MONITOR)
    #103=[#505*3](Z START POINT)
    #104=[#504*2](DEPTH OF CUT REDUCER)

    WHILE[#101GT#503]DO1

    G0X#100Z[#500-#103]
    #102=[#100-#101]*TAN[29.]
    G32X#101W#102F#505
    G32Z#501
    G32X#100W#102
    G0Z[#500-#103]
    IF[[#104*.66]LT[#506*2]]GOTO20
    #104=[#104*.66]
    N20#101=[#101-#104]

    END1

    (FINAL PASS)
    #101=#503
    G0X#100Z[#500-#103]
    #102=[#100-#101]*TAN[29.]
    G32X#101W#102F#505
    G32Z#501
    G32X#100W#102
    G0Z[#500-#103]

    (SPRING PASS)
    G0X#100Z[#500-#103]
    #102=[#100-#101]*TAN[29.]
    G32X#101W#102F#505
    G32Z#501
    G32X#100W#102
    G0Z[#500-#103]
    M99

    Thanks Again for any help. I have a job that I am programming today and I need to do thread sections on it. I'm perfectly capable of longhanding it, but these types of parts keep coming up and I would love to be able to use a macro.

    Ben

  2. #2
    Join Date
    Feb 2011
    Posts
    353

    Re: Thread Sections Help

    here is a macro program i copied from an other post in swiss forum i have not tried it as i use win cnc to generate segmented threads
    G32 Segmenting custom macro

    Here is actually the copy of my program. I belive it all makes sence and should work. Please if anyone can see any problems with it let me know. Thanks. Gary
    citizen a20 funac equiped controller.......


    %
    O1234;
    #229=4 (# OF SEGMENTS);
    #209=.450 (SEGMENT LENGTH);
    ;
    #228=1;
    WHILE[#228 LT #229] D01;
    #200=.050 (LEAD);
    #201=.250 (MAJOR DIA);
    #202=.034 (SINGLE DEPTH);
    #205=.010 (1 ST PASS DEPTH);
    #207=.0015(FIN PASS DEPTH);
    #227=2 (# OF SPRING PASSES);
    #216=10 (DECRESE % AMOUNT);
    ;
    N1 (TURN 1ST SEGMENT LENGTH);
    T500;
    M03 S1=1000;
    G00 X#201+.050 Z-.05 T05;
    G50 S3000;
    G96 S250;
    G99;
    G71 U.050 R.025;
    G71 P110 Q120 U.020 W.005 F.008;
    N110 G00 X#201-[#202*3];
    G01 Z0.0 F.006;
    X#201 Z[#202*3]/2;
    Z#209;
    N120 X#201+.050 ;
    G70 P110 Q120;
    G80;
    G00X#201+.050 Z-.050 T0;
    M09;
    M05;
    M01;
    ;
    N2(THREAD SEGMENT);
    T0400;
    M03 S1=500;
    G00 X#201+[#202*2] Z0.0 T04;
    ;
    (MATH FOR LOOPING AND DECREASING VALUES);
    #203=[#202+#202]*[29]TAN;
    #204=[#202+#205]*[29]TAN;
    #206=#205*[29]TAN;
    #210=#202*[29]TAN;
    #222=#202;
    ;
    (APROACH POINT);
    X#201+[#202*2];
    W-#203+[#200*4];
    ;
    (ROUGHING PASSES);
    WHILE[#222 GT #207] D02;
    #203=#203-#206;
    G99;
    G32 U-[#202+#205]*2 W#204 F#200;
    Z[#209-[#210*2]]+#206;
    U#202*2 W#210;
    G00 Z-[#200*4]+#203;
    ;
    (SUBTRACT PASS FROM SINGLE DEPTH FOR LOOPING);
    #222=#222-#205
    ;
    (CACULATE DEPTH OF CUT AND NEXT X,Z MOVES);
    #215=[#216/100]*#205;
    #205=#205-#215;
    #206=#205*[29]TAN;
    #204=[#202+#205]*[29]TAN;
    END2;
    ;
    (FINISH PASSES);
    (CONSTANTS FOR FINISH CYCLES)
    #231=#201;
    #232=#202;
    #235=#205;
    #237=#207;
    #230=1;
    N100 G32 U-[#232+#207]*2 W#210+[#207*[29]TAN] F#200;
    Z#209-#210;
    U[#232+#207]*2 W#210+[#207*[29]TAN];
    G00 Z-[#210+[#207*[29]TAN]+[#200*4];
    #230=#230+1;
    IF[#230 GT #227] GOTO200;
    GOTO100;

    N200 #228=#228+1;

    IF[#228 GT #229]GOTO300;
    G50 W-#209;
    END1;

    G50 W#209*#229;
    N300 (END LAST SEGMENT);
    GOO X#201+[#202*4] M09;
    M05;
    M30;
    %
    good luck
    rcs60

  3. #3
    Join Date
    Sep 2013
    Posts
    37

    Re: Thread Sections Help

    How Come you stop the spindle between the turn and the thread?

  4. #4
    Join Date
    Feb 2011
    Posts
    353

    Re: Thread Sections Help

    this is a copy from a different post i have never used it but i would take the m5 out of the program
    rcs60

Similar Threads

  1. Dome Sections
    By zachf in forum BobCad-Cam
    Replies: 1
    Last Post: 07-07-2010, 04:53 AM
  2. Cnc sold in sections??
    By mocnc in forum DIY CNC Router Table Machines
    Replies: 2
    Last Post: 05-03-2007, 05:11 AM
  3. Conic sections with G02 & G03?
    By JimmyJazz in forum G-Code Programing
    Replies: 4
    Last Post: 02-16-2005, 11:44 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •