Marker on workpiece to detect reference position