John Kasunich wrote: > Stuart Stevenson wrote: > >>Gentlemen, >> The time idea is not the problem. >> When the axis reaches the home switch and reverses direction the >>axis display flashes to zero. The display immediately resets to a >>number (reflecting the position from machine start up) and the axis >>moves to the axis zero postition of the start up. >> This happens on all three axes. >>thanks >>Stuart > > > This is very informative! > > The code is written so that when the switch is detected the first time > it sets the position. Even though this isn't the final position, it > is close, and by setting the position at that point, the screw error > compensation (if used) will be reading the right part of the curve. > > Then when it hits the index pulse, its supposed to set the position > again, this time getting the exact location. That is somehow loading > the old position again. > > I will check the code in that area again. I just happened to give the home command today when the machine was already actuating the home switch. It moved off the home switch, moved toward it again, and then dashed off to a position that could well have been the machine's position when EMC was started. This sounds like it might at least be related to what Stuart is seeing. If you start the home sequence when NOT actuating the home switch, it appears to work correctly every time.
One possibility that might be causing the problem is digital filtering of the encoder signals. If the width of the index pulse is VERY short, like a couple us, it may be missed by the hardware that resets the encoder count on index, but will always be seen by the D FF that senses the rising edge of index. I think the code would end up "ending the search for index pulse" state, but not zeroing the encoder count. If this is actually what is happening, slowing down the HOME_LATCH_VEL might make the index pulse last longer. But, I don't think this scenario would be triggered by whether the home switch was tripped or not when you initiated the home sequence. So, I think maybe something else is happening, causing the homing state machine to work in a different manner. Any thoughts? Jon ------------------------------------------------------------------------- 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