Encoder control

Added control function file, see comments