Delta Tau GEO BRICK LV Reference Manual

Page of 760
Turbo PMAC/PMAC2 Software Reference
 
Turbo PMAC Program Command Specification 
 416 
 
{letter} is any letter of the English alphabet, except N or O, representing the variable into which 
the value following it will be placed (Q101 to Q126 for A to Z respectively); 
 
following {data} is a floating-point constant or expression representing the value to be put into the 
variable 
This command allows the program to execute a subprogram and then return execution to the next line in 
the program.  A subprogram is entered into Turbo PMAC the same as a program, and is labeled as 
PROGn (so one program can call another as a subprogram).  The number n of the PROG heading is the 
one to which the value after CALL refers:  CALL7 would execute PROG7 and return.  Commanding 
execution of a non-existent subprogram will cause program execution to stop in an error condition. 
The value immediately following CALL can take fractional values.  If there is no fractional component, 
the called program starts at the beginning.  If there is a fractional component, the called program is 
entered at a line label specified by the fractional component (if this label does not exist, Turbo PMAC 
will generate an error and stop execution).  Turbo PMAC works with five fractional digits to specify the 
line label; if fewer are used, it fills out the rest with zeros automatically.  For instance, CALL 35.1 is 
interpreted as CALL 35.10000, which causes a jump to label N10000 of program 35.  CALL 
47.123
 causes a jump to label N12300 of program 47. 
If letters and data (e.g. X1000) follow the CALL{data}, these can be arguments to be passed to the 
subprogram.  If arguments are to be passed, the first line executed in the subroutine should be a READ 
statement.  This statement will take the values associated with the specified letters and place them in the 
appropriate Q-variable.  For instance, the data following A is placed in variable Q101 for the coordinate 
system executing the program; that following B is placed in Q102; and so on, to the data following Z 
being placed in Q126.  The subprogram can then use these variables.  If the subprogram calls another 
subprogram with arguments, the same Q-variables are used.  Refer to READ for more details. 
If there is no READ statement in the subroutine, or if not all the letter values in the CALL line are “read” 
(the READ statement stops as soon as it sees a letter in the calling line that is not in its list of letters to 
read), the remaining letter commands are executed upon return from the subroutine according to their 
normal function.  For example, G01 X10 Y10 is equivalent to a CALL 1000.01 X10 Y10.  To 
implement the normal function for G01 (linear move mode), there would be the following subroutine in 
PROG 1000: 
 
N1000 LINEAR RETURN 
Upon the return, X10 Y10 would be executed as a move according to the move mode in force, which is 
LINEAR
If the specified program and line label do not exist, the CALL command is ignored, and the program 
continues as if it were not there. 
Examples: 
CALL500 
; to Prog 500 at the top (N0) 
CALL500.1 
; to Prog 500 label N10000 
CALL500.12 
; to Prog 500 label N12000 
CALL500.123 
; to Prog 500 label N12300 
CALL500.1234 
; to Prog 500 label N12340 
CALL500.12345 
; to Prog 500 label N12345 
CALL700 D10 E20 
; to Prog 700 passing D and E 
See Also: 
On-line command B{constant} 
Program commands GOTOGOSUBREADRETURNG{data}M{data}T{data},  
D{data}N{constant}O{constant}PRELUDE