Delta Tau GEO BRICK LV User Manual

Page of 440
 
Turbo PMAC User Manual 
230 
 
Executing Individual Motor Moves 
ENDWHILE 
I223=-10  
 
; Home speed 10 cts/msec negative direction 
I224=$0 
 
 
; Re-enable hardware limits 
I7222=11 
 
 
; Capture on flag low and index channel high 
I7223=0    
; Use HOME2 (home flag) as trigger flag 
CMD"#2HM"    
 
; Do actual homing move 
WHILE (M245=1) 
 
; Waits for Home Search to start 
ENDWHILE 
WHILE (M233=0) 
 
; Waits for Home motion to complete 
ENDWHILE 
DIS PLC11 
 
 
; Disables PLC once Home is found 
CLOSE 
   ; End of PLC 
   
Already Into Home?  A similar situation occurs when it is not known on power-up whether or not it is 
already into the home trigger.  Here, the easiest solution is to write a program that evaluates this 
condition; if it is in the trigger, it moves out before doing the real homing. 
;*************** Motion Program Set-up variables (to be saved) ********* 
CLOSE 
M320->X:$078210,20,1 
; Variable for Servo IC 2 Ch. 3 home input 
I325=$078210  ; Use Flags3 for Motor 3 
;************** Motion program to execute routine ********************* 
OPEN PROG 103 CLEAR 
IF (M320=1)  
 
; Already in trigger? 
  I323=10 
 
 
; Home speed 10 cts/msec positive direction 
  I326=1600  
 
; Home offset +100 counts (to make sure clear) 
  I7232=11   
 
; Capture on falling flag and rising index 
  I7233=0 
 
 
; Use Home3 as flag 
  HOME3 
 
 
; "Home" out of switch 
ENDIF 
I323=-10  
 
; Home speed 10 cts/msec negative direction 
I326=0   ; No home offset 
I7232=3     ; Capture on rising flag and rising index 
I7233=0     ; Use HMFL3 as flag 
HOME3 
   ; Do actual homing move 
CLOSE  
 
 
; End of program 
;***************PLC Set-up variables (to be saved) ******************** 
CLOSE 
M320->X:$078210,20,1 
; Variable for Servo IC 2 Ch. 3 home input 
I325=$078210  ; Use Flags3 for Motor 3 
M333->X:$01B0,13,1 
; Desired Velocity Zero bit 
M345->Y:$01C0,10,1 
; Home complete bit 
;**************** PLC program to execute routine ********************* 
OPEN PLC 12 CLEAR 
IF (M320=1)  
 
; Already in trigger? 
  I323=10 
 
 
; Home speed 10 cts/msec positive direction 
  I326=1600  
 
; Home offset +100 counts (to make sure clear) 
  I7232=11   
 
; Capture on falling flag and rising index 
  I7233=0 
 
 
; Use Home3 as flag 
  CMD"#3HM"  
 
; “Home” out of switch 
  WHILE (M345=1)   
; Waits for home search to start