Measure workpiece while machining other workpiece