Date: Tue, 5 Nov 2002 07:50:46 -0800 From: Russell E Owen Subject: Re: 2.5m obslog 20021102 (MJD 52581) >Problem #1 - Secondary actuator B did not find reverse limit switch first try >----------------------------------------------------------------------------- > >While homing the secondary we saw the following time-out while homing axis B: > >:A=0;: B=0;: C=0;: XQ#HOME >: 0363.1, 0363.1, 0363.1, 0000.0, 0000.0 max sec to find reverse limit >switch >Reverse limit switch not depressed for axes: 0, 1, 0, 0, 0 - trying again > 0000.6, 0363.1, 0000.6, 0000.0, 0000.0 max sec to find reverse >limit switch > 0030.5, 0030.5, 0030.5, 0000.0, 0000.0 max sec to find home switch > 0008.6, 0008.6, 0008.6, 0000.0, 0000.0 sec to move away from home switch >Finding next full step > >Re-homing a second time, we had no problems. Note that we started the first >homing from scale=1, focus=0 (for inst=spectro), set up to take mirror numbers >(see mirrros section). We _hope_ this was an isolated time-out. The first homing worked; there was no need to home again (though it's nice to home twice if you have the time). Homing makes two tries to find the reverse limit switch, if necessary, and in this case it succeeded on the second try (thus the message "trying again"). -- Russell More details on the limit switch problem: The axes have a bit of crosstalk, such that motion in A or B will cause slight motion (relative to the reverse/home limit switch) in C. Homing consists of running each axis towards home until it touches the reverse limit switch, at which point that axis halts with full acceleration (as you'd want in such a situation). The axes accelerate quickly, so each switch is barely depressed. Suppose B reaches the switch first; A and C keep moving and this may cause B to release its reverse/home limit switch. I believe that's exactly what happened in the case above. The automatic second attempt almost always fixes the situation--all home switches are almost always still depressed after all axes halt. Very rarely I've even even that fail, in which case issuing the home command again does the trick. Note: if the automatic second attempt takes a long time to find the home switch, then the axis in question is almost certainly stalled (not moving), and there is no point in trying to home again. You can also monitor the Mitutoyos to see if the axes are moving. I wish my code could tell the difference between these two cases, but the Galil makes this nearly impossible (and believe me, I tried!). I use soft limits as a time limit, so each axis will either stop when it hits its reverse/home limit switch or after a reasonable time has passed. This is safe and simple. Unfortunately, there is no to find out whether an axis halted because it hit a limit switch or because it reached a soft limit--the stop code is identical for the two cases. Thus my code cannot easily say "home switch hit, but then released; trying again" vs "timed out while trying to reach the home switch; giving up". One could use multitasking and try to set up timers, but in the Galil this would be messy and less reliable.