Download NC__________________________________Technical

Transcript
PMAC-NC Technical Documentation Manual
N9699 M99;
%
Program:
%
O96 (MAIN PROGRAM THAT DEMONSTRATES BOLT-HOLE PATTERNS);
G65 P9600 X1.0 Y1.0 H1.25 W1.75 Z-.75 (CLAMP 1);
G65 P9600 X7.0 Y8.0 H1.25 W1.75 Z-.75 A-135 (CLAMP 2);
M30
%
Parametric Subroutines
A parametric subroutine is an extended version of an M98 subroutine. The following list
identifies the features that make up a parametric subroutine.
Numeric arguments can be passed from the calling program to the subroutine.
Each subroutine called has access to its own private variables that are not altered by other
subroutine calls. These variables are “local” to the subroutine.
Subroutines can be aliased.
The parametric subroutine is invoked with a line containing G65 and a P code.
Ex:
N100 G65 P50 A1.0 B2.0 C3.0
In the above example, block 100 invokes program 50 as a parametric program. It passes to
program 50 arguments A, B and C.
The G65 command loads the subroutine into memory and allocates a set of local variables for its
use. The local variables of the calling routine are saved and will be restored when the subroutine
returns with an M99. This concept of saving and restoring of local variables is known as nesting.
In the Delta Tau NC nesting is limited to 4 levels. The main program is considered to be nesting
level 0.
Below is an example of how nesting takes place and how variables are allocated in G65 and M98
subroutines.
6
Appendix I. Parametric Programming