588,033 active members*
5,248 visitors online*
Register for free
Login
IndustryArena Forum > CAM Software > EdgeCam > Subprograms Subroutines Help
Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2007
    Posts
    3

    Subprograms Subroutines Help

    I have a series of 20 pockets, all the same, and need to have a one subprogram to machine the pockets. So in my main program, it will move to the pocket location in absolute then go into a subprogram and machine the pocket in incremental mode. Otherwise the program ends up being 10,000 lines long! How do I go about doing this? I am going off of a solid. Please Help. Thank You

  2. #2
    Join Date
    May 2008
    Posts
    3
    Dont trust my guide becuse i am only a Newb but it may help.
    but quessing you could use a M98 p###### ( subprogram number )
    So im quess it would look something like this
    %

    G0 G40 G80 G90 G21;

    T# M6;
    G0 G54 G90 X#. Y#. S#### M3 ;
    G43 H# Z#. M8 ;
    G1 G41 D1 F### X#. Y#. ;
    M98 PO#### ; <<<<<<< ( PROGAM NUMBER )
    X#. Y#. ; <<<<<<<( THE NEXT ABSOLUTE POSTION)
    M98 PO#### ;
    X#. Y#. ;
    M98 PO### ;
    X#. Y#. ;
    G0 G53 Y0. Z0. ;
    M30 ;
    %

    ;
    O##### (subprogramm);

    G1 Z-#.;
    G91 X# Y#;
    X# Y#;
    X# Y#;
    Z 5.;
    G90 G40 X#. Y#.;
    M99;



    thats just my input may be completly wrong but its filled 5 minets of my life so its a good escape from boredom

  3. #3
    Join Date
    Dec 2007
    Posts
    3

    subroutine subprogram

    I needed to be a little clearer in my post. Yes, that is the format I am looking for, but I want edgecam do it. And I need help on what steps to take to do this, to post a program with an incremental subprogram to machine the similar pockets. So, what I am saying is, in a roughing cycle, what do I need to make edgecam post it this way? Do I need to change in my post processor setting, I'm just not sure how to get it to post that way. I have a plate that has 20 pockets all the same shape, equally spaced. I am using a endmill to rough out the pocket then go back with a different tool to finish the parameter.

    ROUGH EXAMPLE

    O1000 ( MAIN )
    T1 M6 ( 1/2 CARB EM )
    G0 G90 G54 X-5.0 Y5.0 M3 S10000
    G43 H1 Z1.0 M8
    G1 Z.1 F100.
    M98 P1001
    G0 X-4.0 Y5.0
    M98 P1001
    G0 X-3.0 Y5.0
    M98 P1001
    ...
    ...
    ...
    O1001 ( SUB )
    G91
    G1 Z-.3 F15.0
    X.25
    Y-.25
    X.5
    Y.5
    G90
    G0 Z.1
    M99

  4. #4
    Join Date
    May 2004
    Posts
    82
    You have to use "Matrix mode" Use controller option for subprograms. Chose how many repeats in X and Y and the distance in X and Y.
    The G-code depends on the PP but a standard fanuc wil give you something like this.

    M98 P101 (first call of sub)
    G52 X10.0 Y0.0 (This will temporary transfere your zeropoint)
    M98 P101 (second call of sub)
    G52 X10.0 Y10.0

    and so on on

    G52 X0 Y0 (this wil transfere your zeropoint back to the startpoint)

    The help files in edgecam explains this pretty well

    For a more random transferring of zeropoint use "Transform - Translate"

    Hopes it makes sense

    Bent

  5. #5
    Join Date
    Apr 2012
    Posts
    19

    Edegcam Subroutines Using translate

    After months of deliberation and headaches I have found the correct way to machine multiple parts with edgecam using subroutines. Its not easy, but it works. You can use geometries (lines) or solid models, and it works for any cycle or operation. This turtorial is solely to help edgecam users, and I am not happy with how complicated it is but, some of us don't have a choice do to company structure etc. So don't poo poo on this unless you have a better way to do it in edgecam and you can explain it in detail instead of name dropping functions that may or may not work. I have tried many different ways of outputing subs and nothing works except this.
    The first thing you should do is to verify you have an adaptive post. If you are using version 2010 or better you need this anyway. How you find out is easy. Just open your post and in the last entry in the NC Style you will see NC debug. If you have this, you have an adaptive post, if you don't its not adaptive. If you open the NC debug you will find a few check boxes. Check the box at the top right that says Generate Code Constructor Trace. Then compile and repost your code and you will see blue lines that tell you exactly where in the Code generator to look to make changes to your post. Use this sparingly, and when you are done, uncheck the box again to get your code back to normal. You may find yourself switching back and forth between edgecam and your post, checking and unchecking the box to debug your code. Now, you want to save your post as a new post IE "Multipart" or whatever so that your changes only effect that post.
    So this is how you get subs to work. Get your part oreiented with the (TOP) cpl like you want and then click geometry point and place a point right on top of your CPL. Now copy that point using translate and move it over (in my case I used x3). Then create a a cpl called g54 and origin it at the 1st point (or the "top" cpl) After that create another CPL and origin it at the other point you made. If you need to do more than 2 parts then do the same process but name the cpls g56 g57 and so on. Now that you have the cpls set, go ahead and find your features and everything you normally do to get ready to switch to manufacture mode. When you click on MANfac mode, choose your new post.
    Call up your first tool and then add a rapid move ( I use x0 y0 z1) This rapid is extremely important but if you don't do it, it won't post right. After your rapid do your cycle or operation as normal. Then go to move>index and index to g55 and put 55 in your work datum over ride in that window. (MAKE SURE YOU ARE USING MOVE > INDEX and not OPERATIONS INDEX) Then add another rapid "x0y0z1" then do your tool change and do another index back to g54 with the 54 in the work datum override. Then add your rapid again and do your cycle. Then do an index to g55 (always use the override) and add your rapid. Repeat this until you Finnish your program. Make sure everything is peachy before you proceed because if you change anything in any cycle you will have to start over back at this point. In fact save a back up copy to to save the head ache.
    Now, do an insert after the 1st index and before the tool change. Click edit > Transform > translate. Put your x y and z increment to match your g55 position. and in the from field select the 1st cycle using that tool and in the to select the last cycle (or the same cycle if you have only one) For repeats use 1 and subroutines yes. This will create the subprogram when you go to post. Repeat this step for each additional cycle.
    When you post your code, you might have a couple unnecessary rapids right after the indexes, I just delete the X and Y and leave the z . Its the only edit I had to do, and its an easy one, so I pick my battles.
    I hope this helps you. I will be posting a video on you tube soon.

  6. #6
    Join Date
    Apr 2012
    Posts
    19

    SUBROUTINE TUTORIAL

    [ame=http://www.youtube.com/watch?v=3clL-vAIgj4]Edgecam Subroutines using Translate to create sub programs - YouTube[/ame]

  7. #7
    Join Date
    Feb 2011
    Posts
    10

    Good EdgeCAM POST with Subroutines

    Quote Originally Posted by gibbsmaster View Post
    I have a series of 20 pockets, all the same, and need to have a one subprogram to machine the pockets. So in my main program, it will move to the pocket location in absolute then go into a subprogram and machine the pocket in incremental mode. Otherwise the program ends up being 10,000 lines long! How do I go about doing this? I am going off of a solid. Please Help. Thank You
    JeffCNC customize good EdgeCAM POST with Subroutines.

Similar Threads

  1. SINUMERIK SUBROUTINES
    By HOLOMON in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 2
    Last Post: 07-25-2008, 12:25 PM
  2. Arguments for Subroutines (G65)
    By theragust in forum Milltronics
    Replies: 5
    Last Post: 10-17-2007, 04:04 PM
  3. EMC and Subroutines?
    By watchman in forum LinuxCNC (formerly EMC2)
    Replies: 9
    Last Post: 06-17-2007, 08:30 PM
  4. Oi subroutines help
    By mishikwest in forum Fanuc
    Replies: 1
    Last Post: 08-01-2006, 11:17 PM
  5. Fanuc 15m Subroutines
    By BROCD in forum Fanuc
    Replies: 11
    Last Post: 02-27-2006, 02:04 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
  •