User's Manual

PMAC User Manual
112 Closing the Servo Loop
What is needed to write the Filter
The user-written filter will be written on host computer using a cross-assembler. Motorola provides
56000 cross-assembler programs for IBM-PC and compatibles (SSP56000CLASa), Macintosh II
(SSP56000CLASb), Sun-3 workstations (SSP56000CLASc), and DEC VAX computers
(SSP56000CLASd). Almost all will work on the IBM PC, because the file will have to be converted to
DOS format anyway. Typically, the routine will be written using a simple screen editor, then converted
to 56000 machine code with the cross-assembler. The machine-code file should have the DOS suffix
LOD for the steps below.
Download and Enable Procedure
Step 1
Assemble the user-written filter into a DOS file with an LOD suffix.
Step 2
Execute the IBM-PC conversion program CODE.EXE that is provided by Delta Tau to convert the
machine code file into a format acceptable by PMAC. Do this by typing at the DOS prompt:
CODE {filename} <ENTER>
where {filename} is the name of the machine code file (without the .LOD suffix). CODE will
generate a file called {filename}.PMC that can then be sent to PMAC.
Step 3
Execute the PMAC Executive Program and select the Editor menu (with mouse, <ALT-E>, or <F10>E).
Select the Download File to PMAC option, and type in the name of the file in response to the prompt
(.PMC is the default suffix). Once <ENTER> is pressed, the Executive Program will download the file
automatically to the proper PMAC memory location, where it will be held indefinitely by the battery-
backed RAM.
Step 4
Enable the user-written filter for each desired motor by setting Ix59for that motor to 1 or 3. If Ix59 is 0 or
2 for a motor (the default), it will use the standard servo algorithm.
Memory Space, Software Interface, and Program Restrictions
The program space allocated for a user-written servo is:
Program code starting address: P:$B800 (P:$9C00 in V1.14 and older)
Maximum allowed program length is 1K 24-bit words (P:$B800 to P:$BBFF; or P:$9C00 to P:$9FFF
in V1.14 and older)
Usable Data Spaces
The data spaces available for variables used in the user-written servo are:
Zero-value-initialized user registers L:$0770 to L:$077F
Un-initialized user registers L:$07F0 to L:07FF. These registers retain the last values written to them
before power-down/reset in battery-backed PMACs; they power up with the last values saved to flash
memory in flash-backed PMACs.
Registers reserved with the DEFINE UBUFFER command; from L:$9FFF, with decreasing address
values to the declared length of the buffer.
Interface to Other Firmware
The following software interface format is used for the PMAC firmware in order to communicate with a
user-written filter:
On entry, the B accumulator contains a 48-bit integer representing desired position (DPOS) in units of
1/(Ix08*32) counts.