Machsupport Forum

Mach Discussion => Mach4 General Discussion => Mach4 Toolbox => Topic started by: Ian R on July 02, 2022, 06:24:11 AM

Title: Nested subroutines
Post by: Ian R on July 02, 2022, 06:24:11 AM
I am running Mach4 Hobby on a 4 axis Textron CNC milling machine.
I would like to run 2 or 3 variables sequentially.
I can successfully run one variable using M98 P1000 L4  to call O1000, but require to nest a second or even a third variable within the subroutine.
Can you have a M98 P1200 L3 ending with M99 inside a O1000 subroutine?
Title: Re: Nested subroutines
Post by: JohnHaine on July 02, 2022, 07:31:06 AM
Just try it!
Title: Re: Nested subroutines
Post by: Ian R on July 03, 2022, 01:01:34 AM
John,
Thanks for prompt "just try it".
I nested subroutine calls from inside subroutines without any problems.
My initial fear was that with 3 or 4 M99's around they may not be tied to their originators.
Thanks
Ian