Good afternoon everyone,

I am having problems calling a subprogram from my main program. Normally we just program things simple. We haven't done anything with parametric programming at all. Now I want to change that. We need more felixibility.

My issue at the moment is calling a subprogram from my main program. I keep getting an error saying the subprogram does not exist. Masterwood manuals do not explain the M98/M99 very well, just a snippet of code to show you with a poorly translated explanation.

Here is the explanation from the book:

Code M98
Code M98 is used to call up a sub-program, the which number is assigned to variable K, without modifying the origin co-ordinates of the called program, the which start point co-ordinates still are X=0 and Y=0.

M98 K R
K Program Number
R Number of repititions

In the example it has this paragraph:

"With the last instruction line we call-up the subprogram no. 660, described here-under. Said subprogram executes the internal parametric machining. Such a program is a true subroutine insofar as it cannot be visualized nor executed alone. All the information necessary for its execution is indeed given through the main program that calls it up: as you can see, the first part resumes precisely all the variables declared in the main program. The second part contains all the calculations necessary for the execution."

Seems simple enough.....

The subprogram name is 602.prg

I've tried M98 K602, M98 K "602.prg" as well as including the full path to the subprogram and still get the same error. "Error 2901 - Subprogram not existing"

I've searched online for answers as well and nothing seems to cover it online. I've found all kinds of Fanuc information for calling sub-programs, it didn't help either.

If anyone has experience with calling subprograms with Masterwood CN10 I would greatly appreciate some advice here.

Thanks in advance!

Andrew