Delta Tau GEO BRICK LV User Manual

Page of 440
 
Turbo PMAC User Manual 
182
 
Motor Compensation Tables and Constants 
Available Registers 
The following data registers may be used by the user-written servo: 
• 
Internal DSP registers R4, N4, R5, and N5 may be used, and do not need to be restored when done. 
• 
Internal DSP registers M0, M4, and M5 may be used, but must be restored to previous values when 
done. 
• 
Motor intermediate value registers X:$000x93/13 through X:$000x9A/1A may be used to hold values 
from cycle to cycle.  They are not used by any Turbo PMAC firmware as long as the user-written 
servo is activated. 
• 
Global registers X/Y:$0010F0 – $0010FF may be used.  They are not used by any Turbo PMAC 
firmware tasks, other than being set to 0 on power-up/reset. 
• 
Registers in the user buffer established by the DEFINE UBUF command may be used.  They are not 
used by any Turbo PMAC firmware tasks. 
• 
Other registers may be used as well, but it is possible for certain tasks of Turbo PMAC firmware to 
overwrite these.  For example, it is possible to use the registers for some P or Q-variables for the user-
written servo, but assigning a value to one of these variables will overwrite the register.  It is also 
possible to use the I-variables for Turbo PMAC’s standard servo algorithms as gains for the user-
written servo. 
Programming Restrictions 
Do not use any levels of the DSP’s stack, so no DO or JSR instructions are permitted. 
Do not use internal DSP address registers R2, R3, R6, and R7; modifier registers M2, M3, M6, and M7; 
offset registers N2, N3, N6 and N7. 
Assembling the Algorithm 
The assembly language algorithm must be assembled into DSP56300 machine code using Motorola’s 
cross assembler for the computing platform.  Follow the instructions from Motorola to do this. 
Linking the Algorithm 
Use the Delta Tau applet CODET.EXE, available on the Delta Tau website to convert the file that results 
from the Motorola assembler into a format that can be directly downloaded to the Turbo PMAC.  This file 
should be archived on the computer or network. 
Downloading the Algorithm 
Use any version of the PMAC Executive program to download this resulting file into Turbo PMAC’s 
program memory.  Remember that it is downloaded into volatile RAM memory.  To have the Turbo PMAC 
retain this algorithm, issue a SAVE command before the controller is reset or power removed from it. 
Executing the Algorithm 
Set bit 0 of Motor xx variable Ixx59 to 1 (Ixx59 = 1 or 3) to select the user-written servo algorithm.  As 
with the PID or the ESA, the servo loop for the motor must be closed in order for this algorithm to 
execute.  It will not execute if the motor is either open-loop enabled or killed.  If using the user-written 
servo algorithm for non-servo tasks, be aware that certain commands (e.g. <CTRL-K>) or fault 
conditions on other motors (fatal following error or amplifier fault if their Ixx24 specifies killing other 
motors on their fault) can disable your algorithm.