Delta Tau GEO BRICK LV User Manual

Page of 440
Turbo PMAC User Manual 
Writing and Executing Motion Programs
 
329
 
Turbo PMAC will reject a run or step command for any of the following reasons: 
• 
A motor in the coordinate system has both overtravel limits tripped (ERR010) 
• 
A motor in the coordinate system is currently executing a move (ERR011) 
• 
A motor in the coordinate system is not in closed-loop control (ERR012) 
• 
A motor in the coordinate system in not activated {Ix00=0} (ERR013) 
• 
There are no motors assigned to the coordinate system (ERR014) 
• 
A fixed (non-rotary) motion program buffer is open (ERR015) 
• 
No motion program has been pointed to (ERR016) 
• 
After a / or \ stop command, a motor in the coordinate system is not at the stop point (ERR017) 
Implementing a Machine-Tool Style Program 
Turbo PMAC permits the execution of machine-tool style RS-274 (G-Code) programs by treating G, M, 
T, and D codes as subroutine calls.  This permits the machine tool manufacturer to customize the codes 
for the machine, but it requires the manufacturer to do the actual implementation of the subroutines that 
will execute the desired actions.  Many of the codes are quite standard, and Delta Tau has provided 
examples of these.  This section goes beyond the simple standards to discuss subtler issues involved in 
implementing the codes. 
G, M, T, and D-Codes 
When Turbo PMAC encounters the letter G with a value in a motion program, it treats the command as a 
CALL to motion program 10n0, where n is the hundreds’ digit of the value.  The value without the 
hundred’s digit (modulo 100 in mathematical terms) controls the line label within program 10n0 to which 
operation will jump.  This value is multiplied by 1000 to specify the number of the line label.  When a 
return statement is encountered, it will jump back to the calling program. 
For example, G17 will cause a jump to N17000 of PROG 1000; G117 will cause a jump to N17000 of 
PROG 1010; G973.1 will cause a jump to N73100 of PROG 1090. 
M-codes are the same, except they use PROG 10n1; T-codes use PROG 10n2; D-codes use PROG 10n3. 
Most of the time, these codes have numbers within the range 0 to 99, so only PROGs 1000, 1001, 1002, 
and 1003 are required to execute them.  For those who want to extend code numbers past 100, PROGs 
1010, 1011, etc. will be required to execute them. 
The manufacturer’s task is to write routines for motion programs 10n0 to 10n3 to implement the codes in 
the manner he desires.  Once this is done, the method of implementation is invisible to the part 
programmers and machine operators. 
Standard G-Codes 
Now we will look at the issues involved in implementing some of the more common G-codes: 
G00 – Point-to-Point Positioning 
Typically this code is implemented in PMAC through use of the RAPID command.  Many users will only 
have RAPID RETURN as their implementation of this code.  (Since this is a call to N0 of PROG 1000, 
and the N0 label is implied automatically by the beginning of any motion program, you should not 
explicitly add an N0; this routine must be at the very top of PROG 1000.)   
Users utilizing an external feedrate override signal often want to disable the override during RAPID 
mode.  This is done in PMAC by setting the time base source address variable back to its default value 
and away from the external source (e.g. I5193=$2000).  Alternately, this variable could be set to 
another external source if the machine had a separate rapid override setting.  The section of the file to 
implement G00 would look something like: 
CLOSE 
OPEN PROG 1000