Delta Tau GEO BRICK LV User Manual

Page of 440
Turbo PMAC User Manual 
Synchronizing Turbo PMAC to External Events
 
351
 
$078318 
$0 
$0 
Referring to the detailed description of the I8000 variables in the Software Reference Manual, notice that 
this table processes all four encoder channels from Servo ICs 2 and 3 using 1/T extension, so the master 
encoder is processed. 
Step 3: Time-Base Calculation 
Now set up an entry in the table to convert the interpolated position to time base format.  Looking at the 
values reported above, either in the raw form shown here, or more clearly in the Executive Program’s 
configuration window, notice that there is no time-base entry, so one must be created.  
The source encoder is processed in the fourth line of the table, with I8003.  Looking up the address of this 
entry, notice that this is at $3504.  If using the Executive Program’s configuration menu, add an entry to 
the end of the table, select the Time Base method, and enter the address – either selecting it from the pick 
list or entering the address ($3504).  Talking directly to the Turbo PMAC, send the I8008=$403504 
command (the initial 4 specifies a time-base entry). 
Now compute the scaling factor.  Look at the nominal speed of 50 inches/sec, the resolution of 500 
cycles/inch and the x4 decode, and calculate: 
50 inches/sec * 500 cycles/inch * 4 counts/cycle 
= 100,000 counts/sec 
= 100 counts/msec 
Since the math works out more easily if this number is a power of two, declare the real-ime” count rate to 
be 128 counts/msec.  Then calculate the scale factor as 131,072 / 128 = 1024.  If using the Executive 
Program’s configuration menu, enter this value into the proper field.  If talking directly to the Turbo 
PMAC, send the I8009=1024 command. 
Step 4: Using the Time-Base Calculation 
Since working in Coordinate System 1, assign I5193 to the address of the second line of this entry (either 
with I5193=@I8009 or I5193=$350A) to point to this time base value.  Set I5194 to the maximum 
value of 8,388,607 so synchronicity will not be lost on rapid changes. 
Step 5: Writing the Program 
In writing the program, work at the real-time input frequency, which differs from the nominal speed 
begun with – in this case, it is exactly 28% faster.  Therefore, any programmed speeds would be 28% 
higher; any programmed times would be 28% less.  Take the nominal cut time of 750 msec (0.75 sec) and 
multiply it by 100/128 to get exactly 585.9375 msec.  The 2500 msec return is similarly scaled to 
1953.125 msec.  (If these numbers do not come out exactly in the program, put the math directly in the 
program; Turbo PMAC calculates with 48-bit floating-point precision.)  There would be a main program 
loop such as: 
WHILE (M11=1) 
; Cut as long as input is true 
TM 585.9375 
; Cut move time 
X10000 
; Actual cut move 
DELAY 500 
; Hold; part of 1953.125 msec return 
TM 953.125 
; Return time; part of 1953.125 msec 
X0 
; Actual return move 
DELAY 500 
; Hold; part of 1953.125 msec return 
ENDWHILE