01First check whether the subprogram exists and where
List the directory and look for the number called. If it is not there, the diagnosis is about loading. If it is there, check which device the main program is running from: memory, card or external, because each one only sees its own.
02If it exists, count the nesting levels
Draw the call tree: main program, what it calls, what that calls, and so on to the end. Count the levels on the deepest branch and include macro calls. Compare against the limit given in your series' manual. If you are right on the edge, any recent addition has pushed it over.
03Look for recursive calls or loops with no exit
Check whether any subprogram ends up calling itself by an indirect route, or whether a repeat loop has no reachable exit condition. If the alarm always trips after the same number of repeats, this is almost certainly it.
04Check the return from every subprogram
A subprogram that does not return correctly leaves the level open, and the stack fills call after call even though the program appears to finish each cycle. You can tell because the alarm appears after several parts, not on the first one.
05If it is an external program call, check the link
Execution from an external device depends on the link being alive at the moment of the call. Check the connection, the selected device, and that the file is where the control looks for it with the exact name it expects.
06Flatten the structure if you have to
If the tree is legitimately deep, the answer is not to fight the limit: it is to remove one level, merging two subprograms or lifting a call up into the main program. It is easier to maintain and it does not come back the next time an operation is added.