# Defining a control area (#CONTROL AREA BEGIN/END)

## 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.

## Notice

A deactivated area can be overwritten by reprogramming using the same ID.

## Attention

Active Cartesian transformations #(A)CS are not considered in the definition of monitored spaces. Workspaces and protection areas are always defined as Cartesian in the MCS coordinate system.

## Programing Example

Define control areas

(Define a polygonal workspace:

:

N10 #CONTROL AREA BEGIN [ID1 WORK POLY MIN_EXCUR=-50 MAX_EXCUR=50]

N20 G01 F1000 G90 X-150 Y75 (Starting point)

N30 X-50 Y150

N40 X50 Y150

N50 X150 Y75

N60 X150 Y0

N70 X50 Y0

N80 X50 Y75

N90 X-50 Y75

N100 X-50 Y0

N120 X-150 Y0

N130 X-150 Y75 (End point identical to starting point)

N140 #CONTROL AREA END

:

(Define a cylindrical protection area:

:

N210 #CONTROL AREA BEGIN [ID2 PROT CIRC MIN_EXCUR=-70 MAX_EXCUR=70]

N220 G01 X100 Y0 F10000 (Starting point for cylindrical prot. area)

N230 G02 G162 I50 J0

N240 #CONTROL AREA END

: