# Defining workspace and protection areas

## Time of definition

No workspace/protection areas are predefined when the controller starts up. A definition in the configuration lists is not possible.

A work or protection space is defined directly in the NC program in a sequence of path motions embedded in plain text commands.

In this case, path motions must always be programmed in absolute dimensions. The contour of the control area in the plane is defined either by a closed polygon formed in any shape by linear blocks (target point and starting point of the block sequence must be identical) or by a full circle. The excursion in the third dimension and further characteristics of the control area are defined in the assigned plaintext command.

Syntax for Start of control area definition:
#CONTROL AREA BEGIN [ ID=.. WORK | PROT POLY | CIRC MIN_EXCUR=.. MAX_EXCUR=.. [EXCUR_AX=.. |EXCUR_AXNR=..] [MONITOR_LVL=..] ]

ID=.. | Identification number of the control area (ID). The definition is global valid after program end and RESET. Up to 20 different control areas can be defined.
WORK | Control area is a workspace.
PROT | Control area is a protection space.
POLY | Contour of a control area is defined as a polygonal shape.
CIRC | Contour of a control area is defined as a full circle.

MIN_EXCUR=.. | Limitation of the control area in the third dimension in negative direction in [mm, inch].
MAX_EXCUR=.. | Limitation of the control area in the third dimension in positive direction in [mm, inch].
EXCUR_AX=.. | Optional specification of an axis identifier for the third excursion direction of the workspace or protection area (as of CNC Build V2.11.2025.00). By default the third main axis is used.
EXCUR_AXNR=.. | Optional specification of a logical axis number for the third excursion direction of the workspace or protection area (as of CNC Build V2.11.2025.00). By default the third main axis is used.
MONITOR_LVL=.. | Specification of the monitoring level, see Control levels (as of CNC Build V3.1.3079.42) IMCS: Intermediate coordinate system (only practical with multi-step transformations) MCS: Machine coordinate system (default)

Syntax for End of control area definition:
#CONTROL AREA END

Each control area must be closed by the command #CONTROL AREA END. Only then can further control areas be defined.

## Sequence of NC command to define a workspace/protection space

Every control area definition begins with #CONTROL AREA BEGIN and must be terminated with #CONTROL AREA END. Between these two commands, the basic geometric form of the workspace or protection area is programmed by means of DIN 66025 motion commands. A valid feedrate (F word) must be active.

Depending on the configured geometric shape, G02 or G03 is expected for cylindrical control areas and G01 for a polygonal area with corresponding motion blocks.

## Attention

When the control area is defined, all positions must be programmed in absolute dimensions (G90).

## Attention

An active Cartesian transformation #(A)CS has no influence during the definition of the control space. Work and protection spaces are always defined as Cartesian in the MCS coordinate system.

## Overwrite control areas

A control area can be overwritten by programming the same ID again. However, the condition is that the control area with this ID is not activated at the same time.

## Additional information

- Polygonal control areas “POLY”
- Cylindrical control areas “CIRC”