Reference Manual
PMAC 2 Software Reference
PMAC Saved Setup Registers 381
; Setup on-line commands
WY:$0723,$00C018 ; 1/T conversion of Encoder 4
WY:$0729,$400723 ; Unriggered time base from 1/T encoder
WY:$072A,512 ; TBSF=131072/256
I193=$072A ; C.S.1 use result for time base
Triggered Time Base ($9, $A, $B): A “triggered” time-base entry is like a regular untriggered time-base
entry, except that it is easy to freeze the time base, then start it exactly on receipt of a trigger that captures
the “starting” master position or time.
In a triggered time-base entry, the first setup line (I-variable) contains a 9, A, or B in the method digit
(bits 20 – 23), depending on its present state. It contains the address of the source register in bits 0 – 15.
The source register for triggered time base must be the starting (X) address for one of the machine
interface channels of a Servo IC.
The second setup line (I-variable) is the time-base scale factor which multiplies the differentiated source
value. The final result value (when running) equals 64 * Time-Base-Scale-Factor * (New Source Count -
Old Source Count). New Source Count and Old Source Count are the values of the addressed encoder
counter, in whole counts.
When this time-base entry is used to calculate a frequency-based time base for a coordinate system, the
TBSF should be set to 2
17
/Real-Time Input Frequency (131,072/RTIF), where the Real-Time Input
Frequency (RTIF) in counts per millisecond, is the frequency at which motion trajectories using this time
base will execute at the programmed speed or in the programmed time. The motion sequence to be slaved
to this frequency should be written assuming that the master is always generating this real-time input
frequency (so always moving at the “real-time speed”). The true speed of trajectories using this time
base will vary proportionately with the actual input frequency.
A triggered time-base entry in Turbo PMAC automatically computes the 1/T count extension of the input
frequency itself before the differentiation. It computes this to 1/32 of a count.
In use, the method digit (comprising bits 20-23 of the first line) is changed as needed by setting of the I-
variable. Triggered time base has three states, frozen, armed, and running, all of which must be used to
utilize the triggering feature.
First, the method digit is set to $9 (e.g. WY:$0728,$90C00C, or M190=$9 with
M190->Y:$0728,20,4) before the calculations of the triggered move are started, to freeze the time
base (and therefore the motion) while the move calculations are done. This is typically done in the user’s
motion program. When this entry is in the frozen state, the table reads the channel’s captured position
register each servo cycle to ensure the triggering logic is reset for the next capture. The final result of the
entry is always 0 when frozen.
Note:
In a PMAC application with a fast CPU and a light computational load, it is
possible that the entry will not be in the “frozen” state during a servo interrupt, and
the table will not get a chance to reset the trigger logic. Therefore, it is advisable
to reset the triggering logic explicitly in the user program with a “dummy” read of
the channel’s captured position register, which is the X-register with an address 3
greater than the address specified in the entry (e.g. X:$C00B if the entry specifies
$C008). The suggested M-variable for the captured position register is Mxx03.
Next, the method digit is set to $B (e.g. WY:$0728,$B0C00C, or M190=$B with
M190->Y:$0728,20,4) after the calculations of the triggered move are finished, to arm the time base
for the trigger. This is typically done in a PLC program that simply looks to see if the entry is frozen and
changes it to the armed state. The final result of the entry is always 0 when armed.