586,119 active members*
3,644 visitors online*
Register for free
Login
Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2006
    Posts
    24

    Loop in Mach 3 Question?? Help please... M47, M99

    I have a question on looping in Mach 3.
    For example, I want to do looping 3 time of the following program:

    G90 G1 X2.0 Y2.0 F400
    G1 X0 Y0

    How do I do it?
    I try to use M47, M99 and L but they all don't work. They don't even appear in Mach3 when I load in.
    Anybody please help how to do it. And how do M47, M99 and L work?

    Thank you in advance for your helps.

  2. #2
    Join Date
    Sep 2005
    Posts
    59
    After you type M47 hit the enter key to put the cursor on the next blank line, and then save.
    I`m not sure why Mach doesn`t show the last line of code but this method works for me. Sometimes I need a blank line on the top of the prog.

  3. #3
    Join Date
    Oct 2006
    Posts
    24
    Joey, Thank you so much for your reply,

    Can you please also help me with looping as well? If I want to do 3 times looping how do I code it? Only at M47 at the end will not stop, it will keep looping it.

  4. #4
    Join Date
    Sep 2005
    Posts
    59
    Try this


    M98 P123 L3
    M30
    O123
    G90 G1 X2.0 Y2.0 F400
    G1 X0 Y0
    M99


    line 1 - M98 calls sub-routine number 123 and L3 commands it to repeat 3 times.
    line 2 - program stops after completing.
    line 3 - O123 ( O=letter O not zero) 123 can be any number you chose as long as it`s the same as in the M98 line.
    line 6 - program return.

  5. #5
    Join Date
    Jan 2006
    Posts
    107

    Re: Loop in Mach 3 Question?? Help please... M47, M99

    Joey:
    After lots of searching and reading I came across your old post. It's Nov 2016 now. It solved my problem and works great! Thank You!
    One thing I found out that may help others, It won't work with my machine if I put line #'s in front of your lines, like "N204"
    If I just copy and paste your code in to my G code it works great.

  6. #6

    RE: Loop in Mach 3 Question?? Help please... M47, M99

    Know this is an old thread.
    Am posting to help others with a related issue.

    Have run into a situation in Mach3 where a loop will only run once, no matter what M98 L is set to.
    (May also cause other issues in Mach3)

    As Joey mentioned put a blank line at the beginning & end of your Mach3 G-code files.
    Additional info: Put a "%" sign (without the quotes) by itself on the last line of the file.

    This will allow your loop to run "L" number of times, instead of just once.

    Hope this helps!

Similar Threads

  1. question on closed loop vs open loop (servo systems)
    By boonie in forum Servo Motors / Drives
    Replies: 20
    Last Post: 11-09-2007, 07:30 PM
  2. Loop in Mach 3 Question?? Help please
    By luther in forum Mach Software (ArtSoft software)
    Replies: 0
    Last Post: 10-07-2007, 05:21 AM
  3. Loop in Mach 3 Question?? Help please
    By luther in forum Mach Software (ArtSoft software)
    Replies: 0
    Last Post: 10-07-2007, 04:55 AM
  4. I need make a loop in Mach
    By cnc_swe in forum Mach Lathe
    Replies: 6
    Last Post: 05-20-2007, 10:26 AM
  5. Mach 3 closed loop ?
    By efrem in forum Mach Mill
    Replies: 5
    Last Post: 12-07-2006, 02:01 AM

Posting Permissions

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