Definition of a contour in NC program code

Time of definition

No contours are predefined when the controller starts up. A definition in the configuration lists is not possible. Contours are defined directly in the NC program in a sequence of path motions embedded in plain text commands. The contours used must then be defined before a machining cycle is called. The contour definition is valid until it is overwritten, deleted or up to program end.

Start of a contour definition

# CONTOUR BEGIN [ID<expr>]

ID <expr> Identification number of the contour.

A contour definition is activated by #CONTOUR BEGIN [ID<expr>]. The freely selectable identification number is then transferred. If a contour already exists with the required identification number, it is overwritten by the new contour.

End of a contour definition

# CONTOUR END

Each contour definition must be closed by the command #ONTOUR END. Only at the end of the contour definition can standard commands be used again.

Description of programming - Description of a contour

Example 1 – Contour definition
Example 1 – Contour definition

#CONTOUR BEGIN [ID1]

G1 G90 X125 Y25 (start point)

G1 X50

G2 G161 X50 Y75 I50 J50

G1 X75 Y100

G1 X100 Y75 F2000

G1 X125 Y75

G1 Y25

#CONTOUR END

Every control area definition begins with #CONTROL BEGIN and must be terminated with #CONTROL END. Between these commands, the geometrical form of the contour is defined by DIN 66025 move commands (G01, G02, G03).

The end point of the first motion block in the contour definition described the start point of the contour. The start point must be defined by a linear motion block (G1). It is read in as absolute irrespective of the dimension system (G90/91). After defining the start point, it is possible to switch between a absolute and a relative description (G90/G91, G161/G162). The use of full circles is not permitted in the contour description..

In addition, it is possible to provide individual contour elements with a feed using the F word. Within the contour definition, this is non modal but must be defined separately for each element as required. Depending on the machining cycle used for the defined contour, there is a difference in the meaning of the defined feed, See the individual cycle descriptions for more detailed information.

Attention

attention

Active Cartesian transformations and offsets are not considered in the definition of the contour. The contour geometry is always specified in the PCS coordinate system. .

Programming example - Adding chamfers and roundings

Example 2 – Contour definition
Example 2 – Contour definition

# CONTOUR BEGIN[ID1]

G1 G90 X25 Y25  (start point)

G1 G91 X50

G302 I12.5

G1 G91 Y50

G301 I12.5 J12.5

G1 G91 X50

G02 G91 X25 Y-25 I0 J-25

# CONTOUR END

Chamfers and roundings can be added to the contour by using G301/G302. Here, a feed definition with #FRC. is not possible.