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


Results 1 to 6 of 6

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

  1. #1
    Registered
    Join Date
    Oct 2006
    Location
    USA
    Posts
    24
    Downloads
    0
    Uploads
    0

    Default 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.

    Similar Threads:


  2. #2
    Registered
    Join Date
    Sep 2005
    Location
    uk
    Posts
    59
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Oct 2006
    Location
    USA
    Posts
    24
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Sep 2005
    Location
    uk
    Posts
    59
    Downloads
    0
    Uploads
    0

    Default

    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
    Member
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    107
    Downloads
    7
    Uploads
    0

    Default 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
    Member Rockmeister's Avatar
    Join Date
    May 2019
    Posts
    1
    Downloads
    0
    Uploads
    0

    Default 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!



Posting Permissions

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


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

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

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