CNC lathe machining detection