Hello Guest it is April 24, 2024, 10:49:54 AM

Author Topic: Nested subroutines  (Read 1253 times)

0 Members and 1 Guest are viewing this topic.

Nested subroutines
« 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?
Re: Nested subroutines
« Reply #1 on: July 02, 2022, 07:31:06 AM »
Just try it!
Re: Nested subroutines
« Reply #2 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