Encoder dir and reset