R27: Multiple measurements at the same location: The system takes the arithmetic mean of the number of measurements taken at the same location, effectively improving the reliability of the measurement results.
R28: Multiple of measurement path 2a: defines the distance from the starting point to the expected switch point. The default path a is 1mm, which can be multiplied by R28. This value must be greater than the braking distance of the machine tool to ensure that the probe can be reliably triggered within its travel.
R29: Weighted factor k (average calculation): This is a key parameter that controls the compensation reaction speed and smoothness. The formula is new average=old average - (old average - difference in current measurement)/k. The larger the value of k, the slower the system's response to a single deviation, but the better the filtering effect on random fluctuations; The smaller the value of k, the faster the reaction, but it is also more susceptible to accidental errors.
R30: Measurement axis number: defined according to DIN 66217 standard, 1=horizontal axis (X), 2=vertical axis (Y/Z), 3=application coordinate (Z/tool axis). This defines which axis the measurement will be performed on.
R33, R34, R36, R37, R40, R41: tolerances and limit parameters
R33: Zero bias range. When the deviation is less than this value, no tool compensation is performed, only the average value is updated to suppress random measurement errors.
R34:2/3 Workpiece tolerance. Within this range, the system compensates for the average value based on the weighting factor k.
R36: Safe area. When the deviation exceeds this limit, an alarm is triggered and the program is interrupted, usually indicating a probe malfunction or incorrect set position.
R37: Dimensional difference inspection. If the deviation exceeds this value (usually indicating severe tool wear or chipping), the system will sound an alarm and the operator can decide whether to continue.
R40/R41: Upper and lower tolerances of the workpiece. If the deviation exceeds this range, the system will compensate 100% and give an alarm prompt of "out of tolerance" or "under tolerance".

Application of Turning Machines in lathe measurement cycles
The lathe measurement cycle mainly includes L972/L982 (tool measurement), L973 (workpiece probe calibration), and L974 (workpiece measurement).
Tool measurement (L972/L982)
This cycle is used to measure the length (L1, L2) and tip radius (R) of the cutting tool.
Calibration: Before the first measurement, a known size "calibration tool" must be used to calibrate the position of the tool probe. Loop L972 (R23=0) will automatically detect and calculate the distance between the probe trigger point and the machine zero point, and store it in the machine data area.
Automatic tool measurement: This is the most efficient mode. Simply define the tool number, experience value storage number, and other parameters in the program (such as R11=11, R23=2), and loop L972 will automatically move the tool to the tool change point. Then, measure the length of the horizontal axis (X-axis) and vertical axis (Z-axis) in sequence, and automatically write the calculated new length into the tool compensation memory. This process supports measuring specific corner positions for milling cutter types (such as 31-38 types).
Workpiece probe calibration (L973)
Similar to tool measurement, the workpiece probe also needs to be calibrated before use. Select the calibration mode through R23 (such as calibrating on any plane, R23=22). Before calibration, the probe needs to be moved to the vicinity of the calibration surface through tool offset (TO). The loop will measure the trigger point and store the results in MDC.
Workpiece measurement (L974)
This is the most commonly used workpiece measurement cycle on lathes, supporting multiple measurement strategies.
Single point measurement with spindle reversal (R23=22): This variant is particularly noteworthy. It first measures a point, then rotates the spindle 180 °, and measures another point on the same diameter again. By taking the average of two points, it is possible to effectively compensate for the eccentricity of the workpiece caused by the clamping of the three jaw chuck, thereby obtaining the true diameter value. This is crucial for rough or irregular workpieces.
Application of Milling Machines Measurement Cycle
For milling machines and machining centers, the main cycles include L976 (probe calibration), L977 (parallel axis measurement), and L979 (arbitrary angle measurement).
Probe calibration (L976)
The milling machine probe is usually stored in the tool magazine, and there will be repeated positioning errors every time it is called. The L976 cycle can be calibrated on a reference hole, reference ball, or reference surface. For example, when calibrating in the reference hole (R23=0), the loop will automatically detect four points (P1-P4) in the XY plane, calculate the offset between the center of the measuring ball and the centerline of the spindle, and store the trigger point in MDC.
Workpiece measurement (L977/L979)
L977- Parallel axis measurement: used to measure the width of holes, axes, slots, and ribs parallel to the machine coordinate system. For example, measuring a hole (R23=1), the loop will first measure two points (P1, P2) in the X direction to find the X center, then automatically move to that center, and then measure two points (P3, P4) in the Y direction, finally calculating the actual diameter and center point coordinates of the hole. The measurement results can be compared with the set value (R42) and tolerance (R40/R41), and automatically compensate for the tool radius or update the zero offset according to the definition of R10.