Reference Manual

Turbo PMAC/PMAC2 Software Reference
Turbo PMAC Global I-Variables 60
I46=0: P-Variables in flash-backed RAM; Q-Variables in flash-backed RAM
I46=1: P-Variables in battery-backed RAM; Q-Variables in flash-backed RAM
I46=2: P-Variables in flash-backed RAM; Q-Variables in battery-backed RAM
I46=3: P-Variables in battery-backed RAM; Q-Variables in battery-backed RAM
For variables stored in flash-backed RAM, values must be copied to flash memory with the SAVE
command in order to be retained through a power-down or reset. The SAVE command operation can take
up to 10 seconds. On power-up/reset, Turbo PMAC automatically copies the last saved values for the P
and Q-variables from flash memory to the flash-backed locations in main RAM memory.
For variables stored in battery-backed RAM, values are automatically retained in the RAM by the battery
voltage. No SAVE operation is required. These values are not affected by a SAVE command or a power-
up/reset.
Access to battery-backed RAM is significantly slower than access to flash-backed RAM, because either
read or write access to the battery-backed RAM requires two wait cycles of nine instruction cycles each,
but read or write access to the flash-backed RAM requires two wait cycles of only one instruction cycle
each.
Storing P and/or Q-variables in battery-backed RAM frees up flash-backed memory for user program and
buffer storage. Storing either P or Q-variables alone in battery-backed RAM allots 8K additional words
for user storage, on top of the standard 26K words (212K with the optional expanded user memory), for a
total of 34K words (optionally 220K); storing both P and Q-variables in battery backed RAM allots 16K
additional words, for a total of 42K words (optionally 228K).
A change in the value of I46 takes effect only at power-up/reset. Therefore, to change the location where
P and/or Q-variables are stored, the value of I46 must be changed, the SAVE command must be issued,
and then the board must be reset. If the new value of I46 would move the P and/or Q-variables from
battery-backed to flash-backed RAM, the SAVE operation copies the variable values from battery-backed
RAM into flash memory so that present values are not lost. At the reset, these values are copied from
flash memory to flash-backed RAM.
I47 DPRAM Motor Data Foreground Reporting Period
Range: 0 to 255
Units: Servo Cycles
Default: 0
I47 specifies the period, in servo cycles, that Turbo PMAC will copy data from servo control registers
into fixed registers in DPRAM for easy access by the host computer, if this function has been enabled by
setting I48 to 1. The data is reported for those motors specified by a mask word in DPRAM.
If I47 is set to 0, the reporting is on demand. In this mode, Turbo PMAC will check every servo cycle to
see if the host computer has set the request bit in DPRAM, signaling that it has read the previous cycle’s
data. Turbo PMAC will copy the latest data into DPRAM only if this bit is set, and it will clear the bit.
I48 DPRAM Motor Data Foreground Reporting Enable
Range: 0 to 1
Units: None
Default: 0
I48 enables or disables the dual-ported RAM (DPRAM) motor data reporting function as a foreground
task at the servo interrupt priority level. When I48=1, Turbo PMAC copies key data from the motor
control registers to fixed registers in the DPRAM every I47 servo cycles (or on demand if I47=0) for easy
access by the host computer. The data is reported for those motors specified by a mask word in DPRAM.