Hello Guest it is November 27, 2021, 02:47:45 PM

Author Topic: Mach 3 Subroutine Codes  (Read 4756 times)

0 Members and 1 Guest are viewing this topic.

Mach 3 Subroutine Codes
« on: November 06, 2008, 09:47:45 AM »
I'm new with a Taig CNC, Mach 3 and BobCadCm to learn.  I notice that the last line of any code does not show in the Mach 3 Program Run window.  In fact, when I write a subroutine starting with M98 and ending with M99, the subroutine runs, but the program stops at the last line in the subroutine - and doesn't return to the program.  I found that if I added another M99 (one after the other), the code now shows in the window and the program runs correctly.  Any help would be appreciated.
Re: Mach 3 Subroutine Codes
« Reply #1 on: November 06, 2008, 10:10:56 AM »
Add some whitespace to the end of your code.

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Mach 3 Subroutine Codes
« Reply #2 on: November 06, 2008, 11:07:07 AM »
Get into the habit of making the last line of your code a % doing that lets you know you have ended the previous line by moving on to the next. You can also do a swarfboy has said but looking at the code in notepad etc doesnt let you see you have remebered to press return after the last line where if the % is there you can see instantly.
Hood
Re: Mach 3 Subroutine Codes
« Reply #3 on: November 06, 2008, 12:19:11 PM »
Thanks for your help.  Now I have another problem.  A white window appeared below the Mach 3 screen and had an option to "Simply window" and I clicked on it.  Now I have a gray screen with only the FIle, Config, Function Cfg's, etc. across the top.  I've lost all the DRO's and other window info.  Any suggestions?

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Mach 3 Subroutine Codes
« Reply #4 on: November 06, 2008, 12:24:31 PM »
Been a long time since I have done that, try going to view menu then load screens then choosing the 1024.set  If that doesnt work then I will try and remember what you need to do.
Hood
Re: Mach 3 Subroutine Codes
« Reply #5 on: November 06, 2008, 12:33:00 PM »
Thanks again.  That was the solution.  I'm new, but I already can tell you that I really appreciate the help you guys give.  Hope someday I'll be smart enought to help others.