Delta Tau GEO BRICK LV User Manual

Page of 440
 
Turbo PMAC User Manual 
328
 
Writing and Executing Motion Programs 
Once PMAC has encountered a PRELUDE1 command in the program, it will execute the specified 
subprogram call each time it encounters a move command or other letter-number command in the motion 
program (including GMT, and D codes, but excluding N and O line labels).  The move command or 
letter-number command must be at the beginning of a program line, or immediately following an N or O 
line label at the beginning of a program line. 
Once PMAC has jumped to the subprogram specified by PRELUDE1, it will treat any move command or 
letter-number command in the subprogram as it normally would; these will not automatically cause 
another subprogram call.  Automatic PRELUDE subprogram calls therefore cannot be nested within each 
other; however, a single PRELUDE subprogram call may be nested within explicit subroutine and 
subprogram calls, and explicit subroutine and subprogram calls may be nested with a single automatic 
PRELUDE subprogram call. 
A new PRELUDE1 command supersedes the existing PRELUDE1 command.  A PRELUDE0 command 
(no arguments necessary) turns off the PRELUDE function. 
Running a Motion Program 
Once your motion program has been entered and the program buffer closed, you may execute the motion 
program.  Since Turbo PMAC can store multiple programs at once, the first thing you must do is tell the 
Turbo PMAC coordinate system which program you wish to run (remember that it is a coordinate system 
in Turbo PMAC that executes a motion program; different coordinate systems may be executing other 
motion programs at the same time).   
Pointing to the Program 
This is done with the B{constant} command, where the {constant} represents the number of the 
motion program buffer.  Use the B command to change motion programs and after any motion program 
buffer has been opened.  It is not necessary if repeatedly running the same motion program without 
modification; when PMAC finishes executing a motion program, the program counter for the coordinate 
system is set automatically to point to the beginning of that program, ready to run it again. 
Use the PC (program counter) command to see which program the coordinate system is pointing to at the 
time.  A response such as P5:0 will be received, which indicates that the coordinate system is pointing to 
motion program 5, at the top (address offset of 0). 
Running the Program 
Once pointing to the motion program to be run, issue the command to start execution of the program.  If 
continuous execution of the program is desired, use the R command (<CTRL-R> for all coordinate 
systems simultaneously).  On a Turbo PMAC controller, take the START/ line on the JPAN connector 
low with the coordinate system selected on the FPDn/ lines of the same connector.  The program will 
execute all the way through unless stopped by command or error condition. 
Stepping the Program 
To execute just one move, or a small section of the program, use the S command (<CTRL-S>for all 
coordinate systems simultaneously), or take the STEP/ line on the JPAN connector low with the 
coordinate system selected on the FPDn/ lines of the same connector.  The program will execute to the 
first move DWELL or DELAY, or if it first encounters a BLOCKSTART command, it will execute to the 
BLOCKSTOP command. 
What PMAC Checks For 
When a run or step command is issued, Turbo PMAC checks the coordinate system to make sure it is in 
proper working order.  If it finds anything in the coordinate system is not set up properly, it will reject the 
command, sending a <BELL> command back to the host.  If I6 is set to 1 or 3, it will report an error 
number as well telling the reason the command was rejected.