Delta Tau GEO BRICK LV Manual De Usuario
Turbo PMAC User Manual
Motor Compensation Tables and Constants
169
User-Written Servo Algorithms
Turbo PMAC supports the installation and automatic execution of user-written servo algorithms. These
can be used if the standard PID and ESA filters are not suitable to get the required servo performance.
Alternately, they can be used for non-servo purposes, with the algorithm guaranteed to execute at the
servo update rate. This can be valuable for fast updates of I/O.
can be used if the standard PID and ESA filters are not suitable to get the required servo performance.
Alternately, they can be used for non-servo purposes, with the algorithm guaranteed to execute at the
servo update rate. This can be valuable for fast updates of I/O.
There are two methods for creating these user-written servo algorithms. The first is a compiled method
called Open Servo, using Turbo PMAC’s high-level language, compiled by the PEWIN32 PRO Executive
program. The second is an assembled method using a Motorola cross-assembler for the DSP56300
family. The compiled method is easier to use and more flexible, permitting the use of floating-point
mathematics. The assembled method generates code that is far more efficient and more compact. Both
methods are discussed below.
called Open Servo, using Turbo PMAC’s high-level language, compiled by the PEWIN32 PRO Executive
program. The second is an assembled method using a Motorola cross-assembler for the DSP56300
family. The compiled method is easier to use and more flexible, permitting the use of floating-point
mathematics. The assembled method generates code that is far more efficient and more compact. Both
methods are discussed below.
Only a single user-written servo algorithm may be installed in a Turbo PMAC. This algorithm can be
executed by any motor on the Turbo PMAC. If you desire that different motors execute different user-
written servo algorithms, this must be accomplished by branching within a single algorithm.
executed by any motor on the Turbo PMAC. If you desire that different motors execute different user-
written servo algorithms, this must be accomplished by branching within a single algorithm.
Open Servo Compiled Algorithms
Turbo PMAC’s Open Servo feature permits writing a custom algorithm in a high-level language that will
execute on Turbo PMAC’s high-priority servo interrupt. This algorithm can be used either for actual
servo control functions, or for other tasks that must execute at a very high priority, such as very high-
frequency I/O, special pre-processing of feedback data, or special post-processing of servo commands.
execute on Turbo PMAC’s high-priority servo interrupt. This algorithm can be used either for actual
servo control functions, or for other tasks that must execute at a very high priority, such as very high-
frequency I/O, special pre-processing of feedback data, or special post-processing of servo commands.
Open Servo algorithms are compiled into DSP machine code in the host computer before being
downloaded into Turbo PMAC’s active memory. They may be retained in Turbo PMAC’s non-volatile
flash memory using the SAVE command. When executed, they replace only the standard servo-loop
algorithm for the motor. All other tasks, including trajectory generation, motion and PLC program
execution, and safety checking, are still executed by the Turbo PMAC’s built-in firmware.
downloaded into Turbo PMAC’s active memory. They may be retained in Turbo PMAC’s non-volatile
flash memory using the SAVE command. When executed, they replace only the standard servo-loop
algorithm for the motor. All other tasks, including trajectory generation, motion and PLC program
execution, and safety checking, are still executed by the Turbo PMAC’s built-in firmware.
The Open Servo feature is a second method for creating user-written servo algorithms in Turbo PMAC.
Previously, this could be done only by writing the algorithm in assembly language for the DSP56300
family using Motorola’s cross-assembler, and downloading the assembled code to the Turbo PMAC. The
Open Servo feature permits these algorithms to be written without the need to understand and use
assembly language.
Previously, this could be done only by writing the algorithm in assembly language for the DSP56300
family using Motorola’s cross-assembler, and downloading the assembled code to the Turbo PMAC. The
Open Servo feature permits these algorithms to be written without the need to understand and use
assembly language.
Turbo PMAC can hold and execute only a single Open Servo algorithm. This algorithm can be run by
multiple motors. The sections below explain tools for this single algorithm to access motor-specific
registers; if different procedures are desired for different motors, this must be handled by explicit logic in
the algorithm.
multiple motors. The sections below explain tools for this single algorithm to access motor-specific
registers; if different procedures are desired for different motors, this must be handled by explicit logic in
the algorithm.
The compiled Open Servo program is similar to the compiled PLC programs, but there are two key
differences:
differences:
•
Open Servo algorithms run on the servo interrupt, with guaranteed execution every cycle (or the
Turbo PMAC will watchdog); compiled PLC programs either run on the real-time interrupt (PLCC 0)
with possible pre-emption by motion program calculations, or in background (PLCC 1 – 31) with no
deterministic execution rate.
Turbo PMAC will watchdog); compiled PLC programs either run on the real-time interrupt (PLCC 0)
with possible pre-emption by motion program calculations, or in background (PLCC 1 – 31) with no
deterministic execution rate.
•
Open Servo algorithms have specific access mechanisms to special registers used for servo functions.
Requirements
The Open Servo requires a Turbo PMAC controller (Turbo PMAC, Turbo PMAC2, UMAC, or QMAC)
with version 1.938 or newer firmware to execute the algorithm. It requires a PC running PEWIN32PRO
version 3.2 or newer PMAC Executive program.
with version 1.938 or newer firmware to execute the algorithm. It requires a PC running PEWIN32PRO
version 3.2 or newer PMAC Executive program.