A programmable controller for controlling one or more outputs based on position
indicated from a position transducer. The controller includes an interface that
converts the transducer signals into a change in position, a transducer position
counter that accumulates the change in transducer position, and a net forward position
counter that accumulates the net forward position. The position counter updates
when the transducer signals indicate a change of position. The net forward position
counter updates when the value of the net forward position counter and the value
of the transducer position counter are equal and the transducer interface indicates
a forward movement. Each controller output has an independent comparator and width
counter. The comparator examines the net forward position to determine when to
change the output or begin a pulse. The width counter counts down to zero, which
ends a pulse.