588,582 active members*
12,727 visitors online*
Register for free
Login

Thread: sub programs

Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2005
    Posts
    225

    sub programs

    I would like to run a subprogram 5 different times at 5 different locations. I have done this before but not in Mach3 and it has been a long time.

    I was trying to use G54 G55 etc.. and to call my sub G98 P1234.
    Can someone give me an example of this code?

    Thanks Tommy

  2. #2
    Join Date
    Jul 2005
    Posts
    12177
    It would be something like:

    Z(well above work)
    G54
    G98 P1234
    Z(well above work)
    G55
    G98 P1234
    Z(well above work)
    G56
    G98 P1234
    etc
    etc

    The subprogram could have a rapid move to the start point such as:

    O1234
    G00 Xxxxxx Yyyyy
    Zzzzz (Now move Z down once you are there)
    blah
    blah
    blah
    Z(well above work)
    M99

    The reason for lifting Z well above the work just before the subprogram and in the subprogram is just for added safety.

  3. #3
    Join Date
    Oct 2005
    Posts
    225
    I tried that almost to the letter (not including Blah,blah, blah).
    I need to start over and see what happens.
    Thanks
    Tommy

  4. #4
    Join Date
    Mar 2003
    Posts
    35538
    Try M98 instead of G98
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  5. #5
    Join Date
    Jul 2005
    Posts
    12177
    Quote Originally Posted by ger21 View Post
    Try M98 instead of G98
    You are correct; I should learn how to type!

Posting Permissions

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