Yay panoramas!
You could do what you’re describing with logic chips, but it would get kind of complicated.
It’s not exactly what you described, but you could use a resistor (lets say 10K) in line with the direction signal, and have two limit switches that would use smaller resistors (lets say 1K) to pull the direction line high or low, depending on which limit switch was pressed. Pulses wouldn’t be blocked at all, but any pulse sent to the stepper motor controller when the motor was already pressing against a limit switch would cause it to rotate away from that limit switch.
Alternatively, if your steppers aren’t super-strong you could just build simple mechanical stops. After all, there are no gear teeth to strip (I’m assuming you’re using the stepper output shafts directly, and not any down-gearing).
-Adam
P.S. By the way, have you seen this thread yet?
