# Specifying the distance (SET_DIST, distance)

## Release Note

Specifying the set distance for distance control is only available as of CNC Build V2.11.2800.28.

## Distance

In addition to specifying the workpiece surface for a given tool height (see previous section), the distance between the tool and the workpiece can also be specified directly in the NC program or via the PLC as of CNC Build V2.11.2800.28.

When distance is commanded via the PLC interface, the set distance can be respecified in every cycle.

In this case tool height is no longer changed by the NC program but is changed explicitly by distance control. This is especially of advantage when a constant distance needs to be maintained to a workpiece surface of any curvature.

For large changes, distance control is supported by additional programming of the Z axis.

Specifying the distance to workpiece for height control

## Attention

If distance control is activated in "constant distance" mode, no further changes in distance to the workpiece can be specified for this axis in the NC program by explicit programming of the Z axis.

Profiled workpiece surface with constant tool distance
Specifying the distance: distance

## Notice

When the Z axis is lifted, distance control must be frozen (FREEZE) or deactivated (OFF), otherwise distance control prevents lifting/lowering.

Block diagram of distance control with distance specification