In modern CNC machining, achieving high-precision and high-efficiency automated production relies on rigorous monitoring of process reliability. One of the key steps is in machine measurement. By integrating a probe system on CNC machine tools and combining it with specific functions of the CNC control system, manufacturers can automatically detect workpiece dimensions, compensate for tool wear, and even identify clamping errors during the machining process. The Measurement Cycles of Siemens SINUMERIK 840/880 series control systems provide a powerful and flexible solution to achieve this goal. This article will provide a detailed interpretation of its core concepts, parameter definitions, configuration process, and practical applications, aiming to provide engineers and technicians with a highly operational technical guide.
The core values and principles of in machine measurement
It is crucial to understand the basic logic of in machine measurement before delving into specific parameters. Its core goal is to detect unacceptable workpiece size deviations in the early stages and automatically initiate compensation measures. These deviations may be due to tool wear, thermal expansion (such as ball screws, bed frames), or workpiece clamping tolerances.
The core of SINUMERIK measurement cycle is the principle of "in machine measurement". Unlike traditional signal transfer through PLC, this system directly processes probe signals at the NC level. The process is as follows:
Start and positioning: The control system sends a movement command to the servo circuit, and the measuring head moves towards the expected measurement point at the set speed.
Signal triggering: When the measuring head contacts the surface of the workpiece, the switch signal is immediately triggered.
Latch actual values: NCK (numerical control core) latches the actual position values of each axis within microsecond level delay and stores them in the specified R parameters.
Delete remaining travel: Once the signal is processed, the system will immediately delete the 'remaining travel' and command the axis to quickly move (G00) back to the starting position.
This direct processing method ensures extremely high measurement repeatability accuracy, up to ± 1 micron, which mainly depends on the repeatability accuracy of the machine tool and measuring head, as well as the resolution of the measurement system.
Selection and parameterization of probe types
Choosing the appropriate probe is the first step towards successful measurement. The SINUMERIK system categorizes probes into three types based on their detectable directions and defines them using the R22 parameter.
Multi directional probe (3D): can be used without limitation for all tool and workpiece measurement cycles.
Bidirectional probe: can be used for measuring workpieces on lathes. On milling machines and machining centers, it is considered a unidirectional probe for use.
Unidirectional probe: can only be used for measuring workpieces on milling machines and machining centers, and has many limitations. Before use, the M19 function must be used to position the spindle at a specific angle (such as 0 °) to ensure that the measuring ball contacts in the correct direction.
In addition, the R22 parameter is used in milling machine applications to distinguish between unidirectional and multi-directional probes through specific values (such as 101). For example, if a multi-directional probe is configured, R22 should be set as the probe number (1 to 14); If it is a unidirectional probe, set it to 100+probe number.

Definition and Logic of Core Parameters
The strength of the measurement cycle lies in its highly configurable nature. The following R parameters are the foundation of each loop and must be defined correctly before use.
R10: Bias Memory Number
In workpiece measurement, R10 is used to specify which zero offset (such as G54-G57) or tool compensation memory (TOA) to automatically store the calculated difference (the difference between the set point and the actual value) after measurement.
In zero point determination mode, R10=0 indicates no automatic writing, 1-4 corresponds to G54-G57, and 5 corresponds to G58.
R11: Experience/Average Memory
Experience values are used to suppress random deviations that do not follow trends, such as system differences between different measuring devices. R11 defines the numbering of the empirical value memory. When calculating the measurement results, the system will automatically add or subtract this empirical value. In addition, R11 is also used to define the average value storage number, which is used for floating averaging the dimensional deviations of multiple processing to smooth out random errors.
R22: Probe type/number: As described in the previous section, define the physical probe used.
R23: Measurement variant: This is the "function selector" that determines which measurement task the loop specifically executes. For example, in the turning cycle L974, R23=0 represents single point measurement to determine the zero point, R23=21 represents single point measurement, R23=22 represents single point measurement with spindle reversal (to eliminate chuck eccentricity), and R23=25 represents circumferential multi-point measurement.
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.
L979- Arbitrary Angle Measurement: When the workpiece features (such as holes) are not parallel to the machine axis, L979 determines the center of the circle by measuring the circle at three or four points. Cycle the use of circular interpolation (G02/G03) to move between measurement points, and use the M19 function to position the spindle at a specific angle at each point, ensuring that the same side of the measuring ball is always used for detection, thereby eliminating the pointing error of the measuring head itself.
Angle measurement (L978)
One unique function of the L978 cycle is to determine the clamping angle of the workpiece on the machine worktable. By measuring two points (MP1, MP2) on the straight edge of the workpiece, the angle between that edge and the machine reference axis (R24 set value) can be calculated in a loop. The calculated angle difference can be automatically written into the coordinate rotation function (G58) to align the subsequent machining coordinate system with the actual position of the workpiece.
Result recording and troubleshooting
Measurement result recording: The system supports outputting measurement results (such as actual dimensions, deviations, and measurement point coordinates) in tabular form to the printer through the CP315 communication module or a dedicated recording module. Users can customize report formats (such as headers, variables, and table lines) through control parameters such as R39, which is crucial for quality traceability and production document recording.
Common alarms and handling: The document provides a detailed list of various alarm numbers and their causes, and understanding these is the key to efficiently solving problems.
4010 "Probe is defective": The probe emits a trigger signal before the measurement path begins. Usually it is a set point error (the probe has been pressed down) or a malfunction of the probe itself.
4011 "Probe does not switch": The probe has completed the entire measurement path 2a without triggering. Usually it is due to the set point being too far away or the probe being damaged.
4030 "Safe area exceeded": The measured deviation is greater than the safe area defined by R36. The measurement results are not accepted, usually due to chips or probe errors triggering at the measurement point.
4040/4041 "Oversize/Understand": The dimensions exceed the workpiece tolerance defined by R40/R41. The program will sound an alarm, but if R10>0, the tool will still be compensated and the operator can decide whether to continue machining.
