I think the time sensitive nature of homing is overcome because the homing is done in the SS and then Mach is told.
Thanks Hood - that makes perfect sense.
THCs not working with smoothstepper and I think I understand why
Why ?
Thanks Amir - thinking I understand it is one thing - trying to explain it is another - but I'll give it a go...
In order for Mach to process inputs in a timely manner there has to be as good as possible "real time" loop between Mach and the hardware it's controling. With the parallel port this is fine and all works well.
BUT with the smoothstepper, the "real time" loop is between the smoothstepper and the hardware. The loop between Mach and the smoothstepper is NOT "real time" because of the very nature of USB (the real clue is in the B for BUS - think bus contention). So this means there is NOT a "real time" loop between the hardware and Mach.
So if by hardware we consider a THC, imagine what happens when the THC commands "UP". It tells the smoothstepper and that communication is "instant". BUT the smoothstepper then has to tell Mach and that communication is NOT instant and will take a period of time that is totally under the control of the USB system. Therefore the "UP" signal will reach Mach late - how late? who knows but late it is. By that time the THC could well be saying "DOWN". Result - We have a variable phase shift between the THC and Mach - Anarchy.
With homing - as Hood has explained, the smoothstepper takes control of the process. I see it working like this: as soon as a home switch is hit, the smoothstepper doesn't JUST tell Mach to stop sending pulses, it stops sending them itself and also tells Mach. It doesn't matter that Mach has sent too many because they're just discarded. The same happens for the backoff part of homing. Of course by this time Mach has effectively lost track of where it is - it doesn't know how many pulses the smoothstepper has discarded, but it doesn't matter - it just sets home to whatever home is and all is back in synch.
Limits is similar except that Mach WILL lose track of where it is - but again that doesn't matter because we accept that hitting a limit more than likely loses position anyway (even with the parallel port) and should be followed by homing.
But - that still leaves me with a problem understanding how probing can work with the smoothstepper. I'd be surprised if it doesn't because I think we'd have heard about it - but at the moment I can't figure out how. On the face of it when it trips, the smoothstepper could just stop sending pulses and tell mach it's tripped - but by then Mach has no idea of where it is. It's different from homing because home is a fixed position known to Mach - but a probe trip is - well - wherever it trips - How can Mach know where that is? Anybody know?
Why am I interested in all this nonesense? I've been working on my own THC design for a while and have a few vague ideas how I can make it work with the smoothstepper.
Well you did ask...
Cheers
Ian