Stuart Stevenson wrote: > Gentlemen, > I am using a ppmc encoder board. > > The parameters in my ini file look like this > HOME = 0 > HOME_OFFSET = 0.0 > HOME_SEARCH_VEL = 0.4 > HOME_LATCH_VEL = -0.01 > HOME_USE_INDEX = YES > HOME_IGNORE_LIMITS = NO
OK. This means the home switch is near the positive end of travel, and you want "machine coordinate 0.000" to be the located at the index pulse just below the switch. Now I understand what you are trying to do. I wonder if that is actually what you want though. With the switch at the positive end of travel, and HOME_OFFSET set to zero, the positive end of the table will be zero, and coordinates for the rest of the table will be negative numbers. That doesn't matter as far as homing goes, just seems kind of odd. > I am using the third sketch from the html page you referenced. Yes, although without the final move... in fact, there might be a VERY short final move in the positive direction, because even moving slowly the machine will overshoot the index pulse by a tiny bit. Even if its only 0.001" or so - it will (should) move back to exactly 0.0000. > I can allow the axis to move to the home switch or I can actuate > the switch by hand with the axis away from the switch. I get the same > results either way it just does it in different spots in the travel of > the ball screw. > When I start the machine the axis postions are zero. When I home > an axis the machine moves in the positive direction until the switch > is activated. When the switch is acitvated the axis reverses direction > and moves very slowly until it reaches the index pulse. So far so good. > The machine > then moves to the startup position. The control does not set the axis > position to zero when it sees the index pulse therefore it uses the > current axis zero position and moves to it. It does turn the axis > home signal on. Something screwy there. You may have found a bug, or something may be misconfigured. I don't have a servo machine here, but I might be able to set up a "machine" using a simulated encoder. Jon Elson (the PPMC guy) probably has more experience homing to index pulses than I do. I did just review the homing code rather carefully, and I can't see anything wrong. However, if the ppmc driver isn't resetting its output to zero when it sees the index pulse, that might cause the symptoms you are seeing. You might want to use halscope to look at the index enable signal and the position feedback from the encoder to EMC. Trigger the scope on the falling edge of index enable, and verify that position either is or becomes zero at that moment. If it doesn't, its probably a driver bug. > It has homed correctly on an axis. Huh? You just said it didn't set the position to zero and moved back to the old zero point instead. That is NOT "homed correctly"! This is yet another case of not speaking precisely. The way I read this, you described the homing process (quite clearly, thank you), and then went on to say "at the end of the process I described in the preceding paragraph, the machine has homed correctly." But the process you described in the preceding paragraph is not correct! Of course, maybe what you meant is "There have been a few OTHER TIMES when it didn't do what I just described, but instead homed correctly." There is a HUGE difference between those two statements, and I have no way of knowing which one is accurate. If we were talking face to face, I could easily ask you to clarify. On a mailing list, it takes forever to get things straight. SPEAK PRECISELY! Every time we have to go back and forth clarifying things it wastes hours (or a day). I assume you want to get this machine running before we both get old. > I then moved the axis and > restarted the machine and the home cycle did not finish correct. I > changed no parameters between the home cycles. I have no idea what, if any, conclusions I can draw from that, because I don't know whether it was truly homed correctly before you moved it. > dmesg gives no error reports. ...for the first homing cycle. > I looked at it prior to the homing > cycle and after the homing cycle. There are no messages generated by > the homing cycle. The last line in the dmesg report was for a thread > created. If I home the machine a second time I get as follows in the > dmesg report > > ERROR: end of move in home state 5 State 5 is "INITIAL_SEARCH_WAIT". That state means it is moving at SEARCH_VEL and waiting to hit the switch. The message means it got to the end of the commanded move without hitting the switch. How far does it move before it stops with this message? It should move twice the distance between the soft limits before it stops - if your soft limits are set right that means it should hit a limit (or hard stop) first. Make sure your soft limit settings make sense - if your table as 30" of travel, the soft limit settings in the ini file should be close to that distance apart. For example, -14.9 and +14.9, or -29.8 and +0.1. The latter example makes more sense in your situation, since you are using zero as the switch location, which is probably near the positive end of travel. By the way, if you (or anyone) wants to understand the homing states, they are listed in http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/emc2/src/emc/motion/motion.h?rev=1.76 about half way down. Search for "HOME_IDLE". The code which actually does the homing is at: http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/emc2/src/emc/motion/control.c?rev=1.107 also about half way down. Search for the second instance of "homing state machine". Even if you don't understand C code, there is a comment block at the beginning of each state that says what is happening in that state. There is a HAL parameter for each axis, "axis.N.home-state", that shows the current state value - it can be observed using halmeter or halscope to see where in the homing sequence you are. Regards, John Kasunich ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users