A method for automatically controlling a distance between a non-contact measurement probe head of a coordinate measuring machine, CMM, and a work piece during a measurement process, the method comprising the steps of: - providing nominal steering commands regarding a lateral movement of the probe head relative to the work piece, the nominal steering commands being configured to provide steering of the work piece and/or the probe head through a measuring path comprising a plurality of measuring positions (22,23,24,241), - performing at a first measuring position a first measuring step comprising: o providing first distance adjustment steering commands configured to provide setting of the distance between the probe head and the work piece, o projecting a primary measuring beam pattern onto the work piece, wherein the primary measuring beam pattern providing a plurality of measurement points, o acquiring a secondary measuring beam pattern, wherein the secondary measuring beam pattern originating from an interaction of the primary measuring beam with the work piece, o deriving surface information based on the acquired secondary measuring beam pattern, characterized in that - probe distance target data regarding a target distance between the probe head and the work piece being provided, - the first measuring step further comprising: o deriving first probe distance information regarding the distance between the probe head and the work piece based on the acquired secondary measuring beam pattern, o deriving a first probe distance deviation based on the probe distance target data and the first probe distance information, o providing the first probe distance deviation to be processed in a step of providing second distance adjustment steering commands for performing a second measuring step at a second measuring position. - providing nominal steering commands regarding a lateral movement of the probe head relative to the work piece, the nominal steering commands being configured to provide steering of the work piece and/or the probe head through a measuring path comprising a plurality of measuring positions (22,23,24,241), - performing at a first measuring position a first measuring step comprising: o providing first distance adjustment steering commands configured to provide setting of the distance between the probe head and the work piece, o projecting a primary measuring beam pattern onto the work piece, wherein the primary measuring beam pattern providing a plurality of measurement points, o acquiring a secondary measuring beam pattern, wherein the secondary measuring beam pattern originating from an interaction of the primary measuring beam with the work piece, o deriving surface information based on the acquired secondary measuring beam pattern, o providing first distance adjustment steering commands configured to provide setting of the distance between the probe head and the work piece, o projecting a primary measuring beam pattern onto the work piece, wherein the primary measuring beam pattern providing a plurality of measurement points, o acquiring a secondary measuring beam pattern, wherein the secondary measuring beam pattern originating from an interaction of the primary measuring beam with the work piece, o deriving surface information based on the acquired secondary measuring beam pattern, - probe distance target data regarding a target distance between the probe head and the work piece being provided, - the first measuring step further comprising: o deriving first probe distance information regarding the distance between the probe head and the work piece based on the acquired secondary measuring beam pattern, o deriving a first probe distance deviation based on the probe distance target data and the first probe distance information, o providing the first probe distance deviation to be processed in a step of providing second distance adjustment steering commands for performing a second measuring step at a second measuring position. o deriving first probe distance information regarding the distance between the probe head and the work piece based on the acquired secondary measuring beam pattern, o deriving a first probe distance deviation based on the probe distance target data and the first probe distance information, o providing the first probe distance deviation to be processed in a step of providing second distance adjustment steering commands for performing a second measuring step at a second measuring position.