CNC machine position encoder