How to coding the draw wire encoder