585,702 active members*
4,208 visitors online*
Register for free
Login

Thread: Sub Routine

Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2008
    Posts
    196

    Question Sub Routine

    how do I accomplish this in TurboCAD/CAM?

    I need to cut several small pieces from a 12" x 12" x 1/4" piece of delrin. I am a little lazy, but would like to learn how to write a sub routine & run that to cut the pieces. The help in the prog is not very useful. well any help would be appreciated. . Also in TCC ther is no command to simply plunge an endmill to create a hole. I have to leave the tool in the machine. as the program runs it calls for a tool change & stops. I hit the start button (Mach3) & keep on going. Any way to eliminate this? I made one piece earlier & here is the code.

    % ( MILL_LOCATING_BUTTON )
    O1
    G20
    G00 G17 G40 G49 G90 Z1.
    ( 5/32 4FLUE HSS END MILL )
    T1 M06
    G00 G90 G54 X12.095 Y12. S12349 M03
    G43 H1 Z1. M08
    ( OPERATION NAME = STEP_DOWN )
    F10.
    ( MILLING POCKET )
    Z0.1
    G01 Z-0.03
    G02 X12.1407 Y11.9704 I-0.095 J-0.197
    G03 Y12.0296 I-0.1407 J0.0296
    G02 X12.095 Y12. I-0.1407 J0.1674
    G01 X11.905
    G02 X11.8593 Y12.0296 I0.095 J0.197
    G03 Y11.9704 I0.1407 J-0.0296
    G02 X11.905 Y12. I0.1407 J-0.1674
    G01 X11.9389 Y11.9296
    G02 X12.1386 Y11.8267 I0.0611 J-0.1266
    G03 Y12.1733 I-0.1386 J0.1733
    G02 X11.8614 I-0.1386 J0.0237
    G03 Y11.8267 I0.1386 J-0.1733
    G02 X11.9389 Y11.9296 I0.1386 J-0.0237
    G03 X11.9571 Y11.9818 I-0.017 J0.0352
    G01 Z0.1
    G00 Z1.
    X12.095 Y12.
    Z0.1
    G01 Z-0.06
    G02 X12.1407 Y11.9704 I-0.095 J-0.197
    G03 Y12.0296 I-0.1407 J0.0296
    G02 X12.095 Y12. I-0.1407 J0.1674
    G01 X11.905
    G02 X11.8593 Y12.0296 I0.095 J0.197
    G03 Y11.9704 I0.1407 J-0.0296
    G02 X11.905 Y12. I0.1407 J-0.1674
    G01 X11.9389 Y11.9296
    G02 X12.1386 Y11.8267 I0.0611 J-0.1266
    G03 Y12.1733 I-0.1386 J0.1733
    G02 X11.8614 I-0.1386 J0.0237
    G03 Y11.8267 I0.1386 J-0.1733
    G02 X11.9389 Y11.9296 I0.1386 J-0.0237
    G03 X11.9571 Y11.9818 I-0.017 J0.0352
    G01 Z0.1
    G00 Z1.
    ( OPERATION NAME = NUB )
    ( MILLING )
    X12.0116 Y12.3315
    Z0.1
    G01 Z-0.06
    G02 X11.9884 Y12.0625 I-0.0116 J-0.1345
    X12.0116 Y12.3315 I0.0116 J0.1345
    G01 Z0.1
    G00 Z1.
    ( MILLING )
    X12.0027 Y11.668
    Z0.1
    G01 Z-0.06
    G02 X11.9973 Y11.938 I-0.0027 J0.135
    X12.0027 Y11.668 I0.0027 J-0.135
    G01 Z0.1
    G00 Z1.
    ( OPERATION NAME = PROFILE )
    ( MILLING )
    X11.9994 Y11.6
    Z0.1
    G01 Z-0.09
    G03 X12.0006 Y12.4 I0.0006 J0.4
    X11.9994 Y11.6 I-0.0006 J-0.4
    G01 Z0.1
    G00 Z1.
    Z0.1
    G01 Z-0.12
    G03 X12.0006 Y12.4 I0.0006 J0.4
    X11.9994 Y11.6 I-0.0006 J-0.4
    G00 Z0.1
    Z1.
    Z0.1
    G01 Z-0.15
    G03 X12.0006 Y12.4 I0.0006 J0.4
    X11.9994 Y11.6 I-0.0006 J-0.4
    G01 Z0.1
    G00 Z1.
    ( MILLING )
    X11.9997 Y11.62
    Z0.1
    G01 Z-0.15
    G03 X12.0003 Y12.38 I0.0003 J0.38
    X11.9997 Y11.62 I-0.0003 J-0.38
    G01 Z0.1
    G00 Z1.
    M05
    G91 Z1. M09
    G28 Y0.
    M01
    ( 5/32 4FLUE HSS END MILL )
    T2 M06
    G00 G90 G54 X11.855 Y12. S8168 M03
    G43 H2 Z1. M08
    ( OPERATION NAME = DRILLING )
    F5.
    ( BORING )
    G99 G82 R0.1 Z-0.15 P0
    X12.145
    G80
    M05
    G91 M09
    G20 X0. Y0. Z0.
    M30

  2. #2
    Join Date
    Sep 2005
    Posts
    127
    I'm just starting with TurbocadCam also. I haven't gotten to subroutines yet, but I recall seeing them in the book. As far as drilling a hole with an end mill, just edit out the tool change lines. Every g code program I've done so far has required manual editing. Either I don't have the machine settings correct, or it just spits out stuff Mach3 doesn't understand.

Similar Threads

  1. program exit sub routine
    By MMTechi in forum G-Code Programing
    Replies: 3
    Last Post: 06-11-2009, 10:51 PM
  2. adding loop sub routine
    By wronggrade in forum Mastercam
    Replies: 3
    Last Post: 04-21-2008, 07:25 PM
  3. ez track V6. pocket routine
    By guy-b in forum Bridgeport / Hardinge Mills
    Replies: 5
    Last Post: 08-03-2006, 01:09 AM
  4. Activating HPCC in a sub-routine?
    By Dawson in forum Daewoo/Doosan
    Replies: 0
    Last Post: 03-18-2006, 09:04 PM
  5. 3D surface sub-routine
    By lazza in forum G-Code Programing
    Replies: 2
    Last Post: 08-30-2005, 02:58 PM

Posting Permissions

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