Delta Tau GEO BRICK LV User Manual

Page of 440
Turbo PMAC User Manual 
Writing a Host Communications Program
 
403
 
DPRAM Motor Data Reporting Buffer 
Turbo PMAC can provide key motor data to the DPRAM, where it can be accessed easily and quickly by 
the host computer.  If this function is enabled, Turbo PMAC will copy key motor registers into fixed 
registers in the DPRAM.   
Foreground vs. Background: This copying function can be done either as a foreground (interrupt) task 
in Turbo PMAC, or as a background task.  Unless it is important to get the data at a guaranteed high 
frequency, it is strongly recommended that the copying be done in background, so as not to starve other 
important tasks on the Turbo PMAC for time.  Even when the information is used for real-time operator 
display, background transfer is the recommended method. 
Enabling Foreground Copying: Setting I48 to 1 enables foreground copying of motor data.  With 
foreground copying, I47 sets the update period.  If I47 is greater than 0, every I47 servo interrupts, Turbo 
PMAC will copy motor registers into the DPRAM.  With I47 at 0, Turbo PMAC will check every servo 
cycle to see if the host computer has taken the previous data.  If so, it will copy the current cycle’s data 
for an “on request” transfer. 
Enabling Background Copying: Setting I57 to 1 enables background copying of motor data and sets I48 
to 0 automatically to disable the foreground copying.  I49 must be set to 1 also to enable the background 
copying of coordinate-system and global data (see next section).  If it is desired not to transfer any 
coordinate-system data, set the “maximum coordinate system number” register in 0x0674 (Y:$06019D) to 
0 (see next section). 
With background copying, I50 sets the update period.  If I50 is greater than 0, each background cycle, 
Turbo PMAC will check to see if more than I50 servo cycles have elapsed since it last copied this data 
into DPRAM.  If so, it will copy the present data.  With I50 at 0, Turbo PMAC will check every 
background cycle to see if the host computer has taken the previous data.  If so, it will copy the present 
data, for an on request transfer. 
Motor Specification: A dedicated 32-bit mask word in DPRAM is used to specify which motors’ data 
will be copied into DPRAM, whether for foreground or background transfers.  This word can be set up 
from either the PMAC side or the host side.  The format is as follows: 
PMAC Address X:$06001C; Host Address Offset 0x0072 
Bit  15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0 
Motor 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 
PMAC Address Y:$06001C; Host Address Offset 0x0070 
Bit  15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0 
Motor 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1 
A value of ‘1’ in the bit enables the transfer for the motor associated with the bit; a value of ‘0’ disables 
the transfer.  These bits may be changed at any time; the new value is effective for the next transfer.  
Setting this entire 32-bit word to 0 will stop all motor data copying. 
Data Copied: For each motor enabled, the following values are transferred into DPRAM: 
• 
Motor following error 
• 
Motor servo command 
• 
Motor servo status 
• 
Motor general status 
• 
Motor position bias 
• 
Motor filtered actual velocity 
• 
Motor master position 
• 
Motor net actual position