Delta Tau GEO BRICK LV ユーザーズマニュアル
Turbo PMAC User Manual
Motor Compensation Tables and Constants
181
Assembled User-Written Servo Algorithms
Highly efficient user-written servo algorithms may be written in the assembly language for the DSP56300
family of processors used in the Turbo PMAC. This requires the use of a cross-assembler from Motorola,
obtainable at no cost from their website. It also requires a linking program from Delta Tau, called
CODET.EXE and running under Microsoft Windows operating systems, available at no cost from the
Delta Tau website.
family of processors used in the Turbo PMAC. This requires the use of a cross-assembler from Motorola,
obtainable at no cost from their website. It also requires a linking program from Delta Tau, called
CODET.EXE and running under Microsoft Windows operating systems, available at no cost from the
Delta Tau website.
Writing the Algorithm
The algorithm is written in Motorola DSP56300 assembly language using any standard text editor. The
code written is subject to the following restrictions.
code written is subject to the following restrictions.
Program Memory Space
The program must start at memory location P:$040000, so the first line of code must be:
The program must start at memory location P:$040000, so the first line of code must be:
ORG P:$40000
For a DSP56303 processor (80 MHz CPU Option 5Cx), the resulting code must end by memory location
P:$040BFF, providing a 3-Kword buffer for the program. For a DSP56309 processor (100 MHz CPU
Option 5Dx) or a DSP56311 processor (160 MHz CPU Option 5Ex), the resulting code must end by
memory location P:$044BFF, providing a 19-Kword buffer for the program. However, in all cases, if a
user-written phase program is used, that program starts at memory location P:$040800, limiting the user-
written servo program to a 2-Kword buffer.
P:$040BFF, providing a 3-Kword buffer for the program. For a DSP56309 processor (100 MHz CPU
Option 5Dx) or a DSP56311 processor (160 MHz CPU Option 5Ex), the resulting code must end by
memory location P:$044BFF, providing a 19-Kword buffer for the program. However, in all cases, if a
user-written phase program is used, that program starts at memory location P:$040800, limiting the user-
written servo program to a 2-Kword buffer.
Conditions on Entry
On entry into the user-written servo, the program can expect the following data for the executing motor in
internal DSP registers:
On entry into the user-written servo, the program can expect the following data for the executing motor in
internal DSP registers:
•
The A10 register contains a 48-bit integer representing the desired velocity in units of 1/(Ixx08*32)
counts per servo cycle
counts per servo cycle
•
The B10 register contains a 48-bit integer representing the desired position in units of 1/(Ixx08*32)
counts
counts
•
The Y register contains a 48-bit integer representing the actual position in units of 1/(Ixx08*32)
counts
counts
•
The R0 register contains the address of the command output and command bias registers for the
executing motor (e.g. $0000BF for Motor 1). This must not be changed.
executing motor (e.g. $0000BF for Motor 1). This must not be changed.
•
The R1 register contains the address of the first status word for the executing motor (e.g. $0000B0 for
Motor 1). This must not be changed.
Motor 1). This must not be changed.
•
The N1 register contains the block length of the motor servo registers ($80 presently), which may be
useful in incrementing from motor to motor. This must not be changed.
useful in incrementing from motor to motor. This must not be changed.
Conditions on Exit
On exit from the user-written servo, the Turbo PMAC firmware expects to find the control effort value in
the A register as a 24-bit signed integer. If Turbo PMAC commutation is enabled for this motor (Ixx01
bit 0 = 1), this value is used as the “quadrature current” (torque) input to the commutation algorithm. If
Turbo PMAC commutation is disabled for this motor (Ixx01 bit 0 =0), this value is copied by Turbo
PMAC firmware to the register specified by Ixx02. In this case, not all of the register may be used. DAC
registers for a PMAC-style Servo IC use only the top 16 bits. DAC registers for a PMAC2-style Servo IC
use only the top 18 bits.
The last line of the user-written servo must be:
On exit from the user-written servo, the Turbo PMAC firmware expects to find the control effort value in
the A register as a 24-bit signed integer. If Turbo PMAC commutation is enabled for this motor (Ixx01
bit 0 = 1), this value is used as the “quadrature current” (torque) input to the commutation algorithm. If
Turbo PMAC commutation is disabled for this motor (Ixx01 bit 0 =0), this value is copied by Turbo
PMAC firmware to the register specified by Ixx02. In this case, not all of the register may be used. DAC
registers for a PMAC-style Servo IC use only the top 16 bits. DAC registers for a PMAC2-style Servo IC
use only the top 18 bits.
The last line of the user-written servo must be:
JMP <$001