Reference Manual

PMAC 2 Software Reference
382 PMAC Saved Setup Registers
In the armed state, the ECT checks every servo cycle for the channel’s trigger bit to be set. When the
ECT sees the trigger (the capture trigger for the machine interface channel as defined by Encoder I-
variable 2 and 3 for the channel used (e.g. I917 and I918 for a PMAC(1) channel 4 or I942 and I943 for a
PMAC2 channel 4), it automatically sets the method digit to $A for “running” time base. It uses the
position captured by the trigger as the starting position (“time zero”) for the running time base.
The following tables show the possible first-line entries for triggered time base (running mode):
Triggered Time-Base Entries for PMAC(1)-Style Servo ICs (Running State)
Channel Entry Channel Entry Channel Entry Channel Entry
1 $A0C000 5 $A0C010 9 $A0C020 13 $A0C030
2 $A0C004 6 $A0C014 10 $A0C024 14 $A0C034
3 $A0C008 7 $A0C018 11 $A0C028 15 $A0C038
4 $A0C00C 8 $A0C01C 12 $A0C02C 16 $A0C03C
Triggered Time-Base Entries for PMAC2-Style Servo ICs (Running State)
Channel Entry Channel Entry Channel Entry Channel Entry
1 $A0C000 5 $A0C020 9 $A0C040 13 $A0C060
2 $A0C008 6 $A0C028 10 $A0C048 14 $A0C068
3 $A0C010 7 $A0C030 11 $A0C050 15 $A0C070
4 $A0C018 8 $A0C038 12 $A0C058 16 $A0C078
Example
The application requires the use of Encoder 4 on board a Turbo PMAC2 as a triggered time base master
for coordinate system 1. It is to be triggered by the rising edge of its index channel. The real-time input
frequency is selected as 256 counts/msec. The conversion table starts with 8 single-line entries in
Y:$0720 – Y:$0727.
; Setup on-line command
WY:$0728,$A0C018 ; Triggered time base from PMAC2 channel 4
WY:$0729,512 ; TBSF=131072/256
I942=1 ; Channel 4 trigger on rising index
I193=$0729 ; C.S.1 use result for time base
M190->Y:$0728,20,4 ; Method digit of time base entry
M403->X:C01B,0,24,S ; Channel’s captured position register
; Motion program segment
DWELL 0 ; Stop any lookahead
M190=$9 ; Freeze the time base
P403=M403 ; Dummy read to ensure capture logic reset
X10 ; Calculate first move
; PLC program segment
IF (M190=$9) ; If frozen
M190=$B ; Then arm
ENDIF
Low-Pass Filter Entries ($D): The $D entry is used to create one of two types of low-pass filters on a
word of input data to provide smoothing of noisy measurements. The two types of filter are distinguished
by bit 19 of the first setup line of the entry. If bit 19 is 0, making the second hex digit $0, the filter is a
simple exponential filter. If bit 19 is 1, making the second hex digit $8, the filter is a more sophisticated
tracking filter that includes an integrator to eliminate steady-state errors.
The simpler exponential filter, which is a three-line entry in the table, is suitable for the smoothing of
noisy master data used for electronic gearing (position following) or electronic cams (external time base).
However, it will produce lags even in the steady state (e.g. at constant velocity), so it is usually not
suitable for smoothing servo feedback data because of the delays it introduces.