586,067 active members*
4,985 visitors online*
Register for free
Login
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2004
    Posts
    210

    Mach 3, M98 can get it to work, Please Help

    Hello Everyone

    I been messing around with this for days, I got it to work in Mach 4 but not with Mach 3
    I do have the 2 files in the Subroutines folde

    Thanks

    Here is my main program
    File name START.TXT

    G20
    G54 x11.0 y10.0
    M98 P0201 L1
    O0201.tap
    M30

    and i also tried, This one works in mach 4 but not in Mach 3

    G20
    G54 x11.0 y10.0
    M98 P0201 L1
    M30

    and my subprogram
    File name O0201.tap

    O0201
    N100G00G20G17G90G40G49G80
    N110G70G91.1
    N120T1M06
    N130 (V-Bit {90 deg 1 inches})
    N140G00G43Z0.5000H1
    N150S24000M03
    N160(Toolpath:- V-Carve 1)
    N170()
    N180G94
    N190X0.0000Y0.0000F100.0
    N200G00X1.2460Y0.9877Z0.1000
    N210G1Z-0.1516F30.0
    N220G1X1.2472Y1.0265Z-0.1516F100.0

    ( Bunch of Code )

    N53310G00Z0.1000
    N53320G00Z0.5000
    N53330G00X0.0000Y0.0000
    N53340M09
    M99
    %

  2. #2
    Join Date
    Apr 2014
    Posts
    215
    From the mach3 manual

    https://machmotion.com/documentation/gcode/Mach3-GCode-Language-Reference.pdf



    10.8.7 Call subroutine - M98
    This has two formats:
    (a) To call a subroutine program within the current part program file code M98 P~ L~ or
    M98 ~P ~Q The program must contain an O line with the number given by the P word of
    the Call . This O line is a sort of "label" which indicates the start of the subroutine. The O
    line may not have a line number (N word) on it. It, and the following code, will normally be
    written with other subroutines and follow either an M2, M30 or M99 so it is not reached
    directly by the flow of the program.
    (b) To call a subroutine which is in a separate file code M98(filename)L~
    for example M98 (test.tap)
    For both formats:
    The L word (or optionally the Q word) gives the number of times that the subroutine is to
    be called before continuing with the line following the M98. If the L (Q) word is omitted
    then its value defaults to 1.
    By using parameters values or incremental moves a repeated subroutine can make several
    roughing cuts around a complex path or cut several identical objects from one piece of
    material.
    Subroutine calls may be nested. That is to say a subroutine may contain a M98 call to
    another subroutine. As no conditional branching is permitted it is not meaningful for
    subroutines to call themselves recursively.

  3. #3
    Join Date
    Apr 2014
    Posts
    215
    G20
    G54 x11.0 y10.0
    M98(O0201.tap) L1
    M30

  4. #4
    Join Date
    Aug 2004
    Posts
    210

    Re: Mach 3, M98 can get it to work, Please Help

    Quote Originally Posted by robertspark View Post
    G20
    G54 x11.0 y10.0
    M98(O0201.tap) L1
    M30
    Tested it and worked perfect, Thanks

Similar Threads

  1. win or get mach to work
    By daisydog in forum WinCnc
    Replies: 7
    Last Post: 12-11-2009, 12:20 AM
  2. Does mach work with DELL
    By Korellibopper in forum Mach Software (ArtSoft software)
    Replies: 5
    Last Post: 02-01-2008, 07:38 PM
  3. getting servos to work using Mach 3
    By robert johnson in forum Mentors & Apprentice Locator
    Replies: 2
    Last Post: 02-04-2007, 05:10 PM
  4. will my drive work with mach 3
    By Fabric8r in forum Mach Mill
    Replies: 1
    Last Post: 02-01-2006, 12:46 PM
  5. will mach 2 or mach 3 work for 4 axis cnc?
    By Runner4404spd in forum Mach Mill
    Replies: 3
    Last Post: 10-05-2005, 05: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
  •