Hello Guest it is March 29, 2024, 05:03:19 AM

Author Topic: How to repeat a subroutine infinitely?  (Read 2260 times)

0 Members and 1 Guest are viewing this topic.

How to repeat a subroutine infinitely?
« on: January 29, 2014, 04:36:55 PM »
Hello,

I have a few jobs where I need to load a tool and then run a few short operations on multiple parts in my vice. I'd like to set up my code so that I load the tool in Mach3 once and then repeat the machining ops multiple times.

Would the following work? Would I just hit Stop after the last part?

-----------------------------
(program start)
M6 T1 (tool change)
G43 H1 (apply TLO)

M98 P1 L9999 (call subroutine)

M30 (end program)

O1
M0 (load part and hit cycle start)
(do some operations)
M99

----------------------------


Thanks,


Chris

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: How to repeat a subroutine infinitely?
« Reply #1 on: February 04, 2014, 05:41:00 AM »
If you are going to press cycle start each time just re-run the main program calling the sub(s) as many times as is needed to complete the operation.

Without engineers the world stops