Delta Tau GEO BRICK LV User Manual

Page of 440
 
Turbo PMAC User Manual 
176
 
Motor Compensation Tables and Constants 
Processor Utilization 
Servo algorithms are one of the most important tasks executed by the Turbo PMAC’s processor, but far 
from the only one.  While Turbo PMAC’s DSP processor is very efficient, it is still possible to overload 
the processor, particularly with floating-point algorithms executing in compiled code from the Open 
Servo.  These do not run nearly as efficiently as the standard servo algorithms, which have been written in 
assembly language and use fixed-point mathematics. 
Generally, it is recommended that the portion of processor time devoted to phase and servo tasks not 
exceed 50%, in order to allow sufficient time for lower-priority tasks, such as motion program and PLC 
program calculations.  To find out how much processor time an Open Servo algorithm occupies, refer to 
the Evaluating the Turbo PMAC’s Computational Load section.  This can be found in the Turbo PMAC 
Computational Features section of this manual. 
Memory Utilization 
The DSP563xx CPU for the Turbo PMAC employs Harvard architecture, with separate areas of program, 
or instruction, memory, and data memory.  The actual instructions of the Open Servo are loaded into P 
program memory; all of the data registers it uses are in X and Y data memory.  
If an Option 5Cx 80 MHz CPU configuration is ordered, employing the DSP56303, only 3K words of 
program memory are available for the Open Servo (P:$040000 through P:$040BFF).  This may not be 
enough for large algorithms, so it is recommended for the user to order a 100 MHz Option 5Dx or 160 
MHz 5Ex CPU configuration, utilizing the DSP56309 and DSP56311 CPUs, respectively, for any 
complex algorithms.  With these processors, 19K words of program memory are available for Open Servo 
code (P:$040000 through P:$044BFF).  For reference, the Open Servo example below that mimics the 
basic PID algorithm occupies 330 words of program memory. 
The downloader will indicate how many words of program memory the program has just compiled 
occupies.  This can be found also by reading memory location P:$040014 (use an RHP:$040014 on-line 
command), which contains the location of the end of the Open Servo algorithm in the Turbo PMAC 
program memory; subtract the starting location $040000 (remember that these are hexadecimal values) to 
get the program length. 
For general data memory, most users will utilize some of Turbo PMAC’s 8192 P-variables to store 
values.  It is the user’s responsibility to keep track of which P-variables are used for Open Servo 
algorithms and which are employed for other user tasks.  Q-variables may also be used for Open Servo 
algorithms; they are always accessed according to Coordinate System 1’s numbering.  It is the user’s 
responsibility to make sure that these P or Q-variables are not used for other tasks as well. 
Many users will find it advantageous to utilize motor-specific registers that are not otherwise being used 
because the Open Servo is executing for that motor.  Registers listed as being gains or intermediate values 
for either the PID or the ESA servo algorithms may safely be used by the Open Servo.  The registers in 
the range $000092 – $0000AC (for Motor 1; equivalent registers for other motors) with the exception of 
$0000A5 (previous net desired position) may be used for this.  Note that the integrated position error 
register at $00009E and the previous net desired velocity register at $00009A are automatically zeroed 
when the loop is opened.  It is not necessary to use these registers in the same format as the automatic 
servo algorithms would. 
Note that any of these registers representing an I-variable for either the PID or ESA algorithms would be 
overwritten by any command writing to that I-variable; that the values in such a register are copied into 
flash memory on a SAVE command; that the last saved value from such a register is copied from flash 
memory on a board reset.  Some users may want to utilize these I-variable registers as gains for their own 
servo algorithms – it is not necessary to use them for the same purpose, or with the same scaling, as the 
built-in algorithms would.