Full bit detection. Poll input port every 44µs, count up LO and HI counter. Exchange speedtables and set counter Z1 to zero if stop or estop detect.