User's Manual

PMAC User Manual
Synchronizing PMAC to External Events 227
The master encoder has 4096 lines per revolution, and typically rotates at about 600 rpm. After being
given the command to run, the X-axis must wait for the index pulse of the master and for 45 degrees past
it. For the next 36 degrees of the master, it must accelerate up to speed, then run at speed for 144 degrees
of the master, and finally decelerate over 36 degrees of the master. This move must cover one full
revolution of the A-axis.
For this example, use the triggered time-base, triggering from the master encoder's index pulse. Choosing
600 rpm as the real-time speed for the master, compute the real-time input frequency (RTIF) in
counts/msec:
secm
counts
84.163
secm1000
sec
line
counts
4
rev
lines
4096
sec60
min
min
rev
600 =
The time-base scale factor (SF) is:
)decimal(
800
84.163
072,131
RTIF
072,131
SF ===
At the real-time speed of 600 rpm (10 rps), one revolution of the master takes 100 msec; so 45 degrees of
the master takes 12.5 msec, and so on.
Set up and Definitions
I915=3 ; x4 decode of ENC 4, set to count up in direction of
; motion
I917=1 ; ENC 4 capture trigger on rising edge of index pulse
WY:$072A,$A0C00C,800 ; Add triggered time base entry to end of default
; conversion table; process $A0 is triggered time base,
; running (post-trigger); $C00C points to ENC4 registers.
; Scale factor is 800 decimal
M199->Y:$072A,16,8 ; Process bits of conversion table entry
&1 ; Address Coordinate System 1
#1->83.33333333A ; Motor 1 is A-axis in C.S.1; 3 x 2500 x 4 cts/rev/
; (360 deg/rev)
Motion Program
CLOSE
OPEN PROG 12 CLEAR
I193=$072B ; Time base source address is triggered
DWELL0 ; time-base conversion in table (2nd line)
M199=$90 ; Freeze the time-base (line before should be a DWELL)
LINEAR ; Linear move mode
INC ; Incremental move specification
TA10 ; 36 degrees of master is 10 msec
TS0 ; No S-curve
DELAY12.5 ; 45 degrees of master is 12.5 msec
TM50 ; 36+144 deg of master is 50 msec
A360 ; One full revolution of slave axis
CLOSE
PLC Program
CLOSE
OPEN PLC 10 CLEAR
IF (M199=$90) ; Has time-base been frozen?
M199=$B0 ; Then arm for trigger
ENDIF
CLOSE