M98 call external subroutine

Here is where you can request new features or special features.

M98 call external subroutine

Postby Robertspark » Thu Nov 22, 2018 1:21 am

Was reading the Mach3 manual and noticed the M98 can call an external subroutine.

Had a look at the uccnc manual and noticed that an external subroutine was not mentioned....

Wondering if this was possible / possible to add with minimal impact or ease?

Code: Select all
G91
M98(O0201.tap) L5
G90
M30


Check out item b in the below extract from the mach3 manual.

https://machmotion.com/documentation/gc ... erence.pdf

10.8.7 Call subroutine - M98
This has two formats:
(a) To call a subroutine program within the current part program file code M98 P~ L~ or
M98 ~P ~Q The program must contain an O line with the number given by the P word of
the Call . This O line is a sort of "label" which indicates the start of the subroutine. The O
line may not have a line number (N word) on it. It, and the following code, will normally be
written with other subroutines and follow either an M2, M30 or M99 so it is not reached
directly by the flow of the program.
(b) To call a subroutine which is in a separate file code M98(filename)L~
for example M98 (test.tap)

For both formats:
The L word (or optionally the Q word) gives the number of times that the subroutine is to
be called before continuing with the line following the M98. If the L (Q) word is omitted
then its value defaults to 1.
By using parameters values or incremental moves a repeated subroutine can make several
roughing cuts around a complex path or cut several identical objects from one piece of
material.
Subroutine calls may be nested. That is to say a subroutine may contain a M98 call to
another subroutine. As no conditional branching is permitted it is not meaningful for
subroutines to call themselves recursively.
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: M98 call external subroutine

Postby Dan911 » Fri Nov 23, 2018 1:19 am

Hi Robert,
Reading through manual I don't see this being available like you already posted, but UCCNC certainly provides the tools/functions to accomplish this.
If this is something you need or know of where needed I would be happy to give it a go, or.... if this is something your working I would help the best I know how.

Dan
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: M98 call external subroutine

Postby Robertspark » Fri Nov 23, 2018 3:25 am

Thanks Dan, not working on anything (yet) I was asking balazs if it could be incorporated into m98 as I presume m98 is an internal macro (not checked).

If the answer from balazs is no / too difficult I'll give it a go (my macro code is rusty so I need the practice.... Give a man a fish or teach him to fish).

Unless someone has a need for it urgently.
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm


Return to Feature Request

Who is online

Users browsing this forum: No registered users and 4 guests