omron — Which Direction to Home?

PMAC Product Guide ;*********** PLC program to execute routine ********************* OPEN PLC 10 CLEAR I125=$2C000 ; Disable +/-LIM as limits CMD"#1HM" ; Home #1 into limit and offset out of it WHILE (M145=1) ; Waits for Home Search to start ENDWHILE WHILE (M133=0) ; Waits for Home motion to complete ENDWHILE I125=$C000 ; Re-enable +/-LIM as limits DIS PLC10 ; Disables PLC once Home is found CLOSE ; End of PLC Multi-Step Homing Procedures Sometimes a homing procedure is required that cannot be executed with a single PMAC homing move. In this case, use two (or possibly more) homing search moves, changing the move parameters in between.

Although this can be done with a sequence of on-line commands, it is easier to create a small motion program to execute the sequence. Which Direction to Home? The most common of these situations is the case in which it is not known on which side of the home trigger at power-up. In this case, move into one of the limit switches to make sure the position is at one end of travel (this can be done by homing into the limit, much as in the above example). Then do a homing move the other direction into the real home trigger. A sample Motion Program routine that does this is: CLOSE OPEN PROG 102 CLEAR I223=10..... ; Home speed 10 cts/msec positive direction I225=$2C004.

; Disable +/-LIM2 as limits I226=0...... ; No home offset I907=2...... ; Capture on rising edge of a flag I908=1...... ; Use -LIM2 as flag (positive end limit!) HOME2....... ; Home into limit I223=-10.... ; Home speed 10 cts/msec negative direction I225=$C004.. ; Re-enable +/-LIM2 as limits I907=11..... ; Capture on flag low and index channel high I908=0...... ; Use HMFL2 (home flag) as trigger flag HOME2....... ; Do actual homing move CLOSE A sample PLC Program routine that does this is: CLOSE M233->X:$0079,13,1 ; Desired Velocity Zero bit M245->Y:$08D4,10,1 ; Home complete bit OPEN PLC 11 CLEAR I223=10..... ; Home speed 10 cts/msec positive direction I225=$2C004.

; Disable +/-LIM2 as limits I226=0...... ; No home offset I907=2...... ; Capture on rising edge of a flag I908=1...... ; Use -LIM2 as flag (positive end limit!) CMD"#2HM"... ; Home into limit WHILE (M245=1) ; Waits for Home Search to start ENDWHILE WHILE (M233=0) ; Waits for Home motion to complete ENDWHILE I223=-10.... ; Home speed 10 cts/msec negative direction Programming PMAC 63