Delta Tau GEO BRICK LV User Manual
Turbo PMAC User Manual
134
Setting Up Turbo PMAC-Based Commutation and/or Current Loop
The last line of the user-written phase must be RTS (ReTurn from Subroutine).
Available Registers
The following data registers may be used by the user-written phase:
Available Registers
The following data registers may be used by the user-written phase:
•
Internal DSP registers R0, N0, R1, N1, R5, and N5 may be used, and do not need to be restored when
done.
done.
•
Internal DSP registers M0, M1, M4, M5, R4, and N4 may be used, but must be restored to previous
values when done.
values when done.
•
Motor commutation registers X:$000xB2/32 through X:$000xBF/3F that are not I-variable registers
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 phase is activated.
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 phase 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.
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.
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.
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.
•
The 2048-entry sine and cosine tables used by Turbo PMAC’s built-in phase routine are located at
addresses $003800 – $003FFF. The sine table is in Y-memory; the cosine table is in X-memory.
Turbo PMAC firmware automatically sets up these tables at power-up/reset; it does not write to these
registers afterwards.
addresses $003800 – $003FFF. The sine table is in Y-memory; the cosine table is in X-memory.
Turbo PMAC firmware automatically sets up these tables at power-up/reset; it does not write to these
registers afterwards.
Programming Restrictions
Any levels of the DSP’s stack may not be used, so no DO or JSR instructions are permitted.
Internal DSP address registers R2, R3, R6, and R7 may not be used; modifier registers M2, M3, M6, and
M7; offset registers N2, N3, N6 and N7.
Any levels of the DSP’s stack may not be used, so no DO or JSR instructions are permitted.
Internal DSP address registers R2, R3, R6, and R7 may not be used; 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.
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 your computer or network.
results from the Motorola assembler into a format that can be directly downloaded to the Turbo PMAC.
This file should be archived on your 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 is removed
from it.
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 is removed
from it.
Executing the Algorithm
Set bit 1 of Motor xx variable Ixx59 to 1 (Ixx59 = 2 or 3) to select the user-written phase algorithm for
this motor. If bit 0 of Ixx01 is also set to 1, the user-written phase algorithm will execute for this motor
every phase cycle (every [I7+1] phase interrupts, every phase interrupt with the default I7 value of 0),
regardless of whether the motor is open-loop, closed-loop, enabled or disabled. Ixx00 for the motor does
not even have to be set to 1.
this motor. If bit 0 of Ixx01 is also set to 1, the user-written phase algorithm will execute for this motor
every phase cycle (every [I7+1] phase interrupts, every phase interrupt with the default I7 value of 0),
regardless of whether the motor is open-loop, closed-loop, enabled or disabled. Ixx00 for the motor does
not even have to be set to 1.