CNC milling machine encoder