585,973 active members*
4,193 visitors online*
Register for free
Login
Results 1 to 10 of 10
  1. #1
    Join Date
    Feb 2007
    Posts
    1538

    SHARE YOUR SUB ROUTINES

    Hi Folks

    Please share your knowledge on sub routines.

    I am a beginner on this subject and am keen to learn more.

    I start the ball rolling with this video:

    Cheers keen


    https://www.youtube.com/watch?v=mOmy1fv8xDE

  2. #2
    Join Date
    Jun 2008
    Posts
    1082

    Re: SHARE YOUR SUB ROUTINES

    I have a calling program that makes use of GOTO commands, variables, "IF" conditions, and subroutines (separate subroutine files, but I imagine it would work with subroutines within the same file as well). The purpose of the program is to mill the same parts at many positions in a grid (it can also just do a line of parts and I'd guess it could be adapted for a rotary table).

    I posted the code and a pretty exhaustive explanation over here... (post #2)
    http://www.cnczone.com/forums/tormac...etter-way.html

    It didn't get much of any response over there so maybe it's not as good as I think it is. Maybe it's simply incompatible with Path Pilot (it does use GOTO, which apparently isn't supported by LinuxCNC). The GOTOs do make it a bit confusing, but the code is efficient as far as I can tell (as an untrained hobbyist).

    Since I don't have a Path Pilot machine I can't test my macro program with Path Pilot. I also don't use Mach3 any more, so I haven't tested it there either. That makes me wonder if I should be sharing it on this thread. On the other hand, I was introduced to variables by WOTDesigns, who shared some code he used with a Haas (I think). So I figured even my potentially incompatible code would be helpful.

  3. #3
    Join Date
    Aug 2010
    Posts
    599

    Re: SHARE YOUR SUB ROUTINES

    I did a recent video on this:
    https://youtu.be/nh5Cn74naq8

    Sent from my SCH-I545 using Tapatalk
    warmachinellc.com

  4. #4
    Join Date
    Mar 2009
    Posts
    1863

    Re: SHARE YOUR SUB ROUTINES

    I'm still using Mach 3 and after seeing that video, I don't think I'll be switching any time soon.

    When I run a sub routine in Mach 3, at the sub routine call the line says M98PXXXX.

    At the end of the sub, I tell it M99 and it goes back to the main body of the program.

    Then move to the next spot and M98PXXXX again then M99.

  5. #5
    Join Date
    Feb 2007
    Posts
    1538

    Re: SHARE YOUR SUB ROUTINES

    Quote Originally Posted by SWATH View Post
    I did a recent video on this:
    https://youtu.be/nh5Cn74naq8

    Sent from my SCH-I545 using Tapatalk
    Thanks for that SWATH - The G code language you are using seems quite different from pathpilot.

    To save the time trialling, does anyone out there know if it would also work with pathpilot

    Keen

  6. #6
    Join Date
    Feb 2007
    Posts
    1538

    Re: SHARE YOUR SUB ROUTINES

    Quote Originally Posted by Hirudin View Post
    I have a calling program that makes use of GOTO commands, variables, "IF" conditions, and subroutines (separate subroutine files, but I imagine it would work with subroutines within the same file as well). The purpose of the program is to mill the same parts at many positions in a grid (it can also just do a line of parts and I'd guess it could be adapted for a rotary table).

    I posted the code and a pretty exhaustive explanation over here... (post #2)
    http://www.cnczone.com/forums/tormac...etter-way.html

    It didn't get much of any response over there so maybe it's not as good as I think it is. Maybe it's simply incompatible with Path Pilot (it does use GOTO, which apparently isn't supported by LinuxCNC). The GOTOs do make it a bit confusing, but the code is efficient as far as I can tell (as an untrained hobbyist).

    Since I don't have a Path Pilot machine I can't test my macro program with Path Pilot. I also don't use Mach3 any more, so I haven't tested it there either. That makes me wonder if I should be sharing it on this thread. On the other hand, I was introduced to variables by WOTDesigns, who shared some code he used with a Haas (I think). So I figured even my potentially incompatible code would be helpful.
    Thanks for that HIRUDIN - Does anyone out there know if this code language would work in pathpilot?

    Keen

  7. #7
    Join Date
    Feb 2007
    Posts
    1538

    Re: SHARE YOUR SUB ROUTINES

    Quote Originally Posted by Steve Seebold View Post
    I'm still using Mach 3 and after seeing that video, I don't think I'll be switching any time soon.

    When I run a sub routine in Mach 3, at the sub routine call the line says M98PXXXX.

    At the end of the sub, I tell it M99 and it goes back to the main body of the program.

    Then move to the next spot and M98PXXXX again then M99.
    Hi Steve. Yes you seem to be using the same code language as in the SWATH video above - does this language work in pathpilot?

    Keen

  8. #8
    Join Date
    Jul 2003
    Posts
    1754

    Re: SHARE YOUR SUB ROUTINES

    m98/99 will be added to path pilot in the future... (they have already pushed it to a branch on linuxcnc.org for testing.) Thanks Tormach!

    Quote Originally Posted by keen View Post
    Hi Steve. Yes you seem to be using the same code language as in the SWATH video above - does this language work in pathpilot?

    Keen

  9. #9
    Join Date
    Nov 2005
    Posts
    201

    Re: SHARE YOUR SUB ROUTINES

    That is how i do it to

    Quote Originally Posted by Steve Seebold View Post
    I'm still using Mach 3 and after seeing that video, I don't think I'll be switching any time soon.

    When I run a sub routine in Mach 3, at the sub routine call the line says M98PXXXX.

    At the end of the sub, I tell it M99 and it goes back to the main body of the program.

    Then move to the next spot and M98PXXXX again then M99.

  10. #10
    Join Date
    Mar 2009
    Posts
    1863

    Re: SHARE YOUR SUB ROUTINES

    Quote Originally Posted by keen View Post
    Hi Steve. Yes you seem to be using the same code language as in the SWATH video above - does this language work in pathpilot?

    Keen
    I don't know if the M98/99 code will work with Path Pilot. Tormach says they are working in it, but it's not available yet.

    I saw the 440 last weekend, and was quite impressed although, Andy was just babying the machine, it's quite capable of removing a lot of material if programmed the right way.
    You can buy GOOD PARTS or you can buy CHEAP PARTS, but you can't buy GOOD CHEAP PARTS.

Similar Threads

  1. Simple routines for the offering
    By rfrenzl in forum G-Code Programing
    Replies: 2
    Last Post: 08-01-2008, 07:22 PM
  2. Help Making Sub Routines
    By PROTOTRAKFAN in forum Parametric Programing
    Replies: 7
    Last Post: 07-15-2008, 12:09 AM
  3. Sub Routines on VF3
    By Rocko1 in forum Haas Mills
    Replies: 8
    Last Post: 11-10-2007, 09:41 PM
  4. sub routines
    By earl in forum Fanuc
    Replies: 2
    Last Post: 03-04-2007, 09:34 AM
  5. ok share the knowledge share the wealth...huh...right
    By oaktree444 in forum MetalWork Discussion
    Replies: 9
    Last Post: 10-18-2005, 10:54 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
  •