John Kasunich wrote: > Jon Elson wrote: > > >>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. > > > This is EXACTLY the kind of thing that would explain the results > that Stuart is seeing. You may recall I suggested that he try > using halscope to monitor the encoder feedback and trigger on > the falling edge of index-enable. When index-enable falls, the > position feedback should be zero - easy to see with halscope. > I had this problem on the PWM controller in an intermediate stage of the firmware. I have corrected it, and no longer see that symptom. I checked for it on the PPMC when I updated that firmware, but did not see such a condition. Setting up the halscope to spot this is fairly easy, although there's no way to make halscope trigger on the specific condition. But, it seems that Stuart is having this problem nearly 100% of the time. > If either one of you can make the problem occur reliably, please > do that test. Its 4am here, and I'm going to bed, but if you > need step-by-step instructions, just ask and I'll post them > tomorrow. > > If the hardware/driver combination clears index-enable without > resetting counts and position, that is definitely a bug in either > the hardware or the driver. I'm very surprised that you have two > separate hardware paths, one for resetting the counter and a > different one for reporting the index pulse to the software. > That is a race condition just waiting to happen. > Yeah, but it depends on the index pulse being too narrow to trigger the "reset count on index" logic. If the index pulse is just 2 us wide, then the reset-on-index logic has to trigger, and it does the reset within 500 ns. Even if the CPU picks up the "index pulse seen" bit, it can't read the encoder count before the reset happens. So, it ought to be safe, unless you do the index search at an encoder count rate higher than several hundred KHz - highly unlikely. > >>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. > > > Your message says it misbehaved once when you started homing while > on the switch, and never during several tries when you you started > from off the switch. You don't say if: > > A) you tried it on the switch several times, and it repeatedly > failed, or > I have to repeat this test in a controlled manner. > B) you only tried it on the switch once. > > If B, it could be a random failure that just happened to occur > that one time when you were on the switch - no cause and effect > relationship between the failure and where you start. > > If A, then there is probably some connection... maybe the axis is > running at a different speed in the two cases. In any case, if > its A, then the problem is repeatable and you can halscope it. I think there IS a connection, as I was having the same problem before I changed the sense polarity of the home switch. I was getting about a 50% probability of a runaway before doing that. That was back this January. I had a part to make for my pick and place machine and was having a lot of things not going right, so I noted the anomaly as sounding related, and will do some more testing soon to see if I can track down the problem.
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