Complex contour formula

Fundamentals

Using complex contour formulas, you can combine several subcontours (pockets or islands) to program complex contours. You define the individual subcontours (geometry data) in separate NC programs or subprograms. In this way, any subcontour can be reused any number of times. The control calculates the complete contour from the selected subcontours, which you link through a contour formula.

Program structure: Machining with SL Cycles and complex contour formula

0 BEGIN CONT MM

...

5 SEL CONTOUR "MODEL"

6 CYCL DEF 20 CONTOUR DATA

...

8 CYCL DEF 21 ROUGH-OUT

...

9 CYCL CALL

...

13 CYCL DEF 23 FLOOR FINISHING

...

14 CYCL CALL

...

16 CYCL DEF 24 SIDE FINISHING

...

17 CYCL CALL

...

50 L Z+250 R0 FMAX M2

51 END PGM CONT MM

 
Tip

Programming notes:

  • The memory capacity for programming an SL cycle (all contour description programs) is limited to 100 contours. The number of possible contour elements depends on the type of contour (inside or outside contour) and the number of contour descriptions. You can program up to 16384 contour elements.
  • To use SL cycles with contour formulas, it is mandatory that your program is structured carefully. These cycles enable you to save frequently used contours in individual NC programs. Using the contour formula, you can connect the subcontours to define a complete contour and specify whether it applies to a pocket or island.

Properties of the subcontours

  • The control assumes that each contour is a pocket. Thus, do not program a radius compensation.
  • The control ignores feed rates F and miscellaneous functions M.
  • Coordinate transformations are permitted—if they are programmed within the subcontours, they are also effective in the NC programs called subsequently. However, they need not be reset after the cycle call.
  • Although the called NC programs can contain coordinates in the spindle axis, such coordinates are ignored.
  • The working plane is defined in the first coordinate block of the NC program.
  • Subcontours can be defined with different depths according to your requirements.

Cycle properties

  • The control automatically positions the tool to the set-up clearance before a cycle.
  • Each level of infeed depth is milled without interruptions; the cutter traverses around islands instead of over them.
  • The radius of inside corners can be programmed—the tool will not stop, dwell marks are avoided (this applies to the outermost path of roughing or side finishing operations)
  • The contour is approached on a tangential arc for side finishing
  • For floor finishing, the tool again approaches the workpiece on a tangential arc (for spindle axis Z, for example, the arc is in the Z/X plane)
  • The contour is machined throughout in either climb or up-cut milling

The machining dimensions, such as milling depth, allowances, and clearance height, can be entered centrally in Cycle 20 CONTOUR DATA or 271 OCM CONTOUR DATA.

Program structure: Calculation of the subcontours with contour formula

0 BEGIN MODEL MM

1 DECLARE CONTOUR QC1 = "120"

2 DECLARE CONTOUR QC2 = "121" DEPTH15

3 DECLARE CONTOUR QC3 = "122" DEPTH10

4 DECLARE CONTOUR QC4 = "123" DEPTH5

5 QC10 = ( QC1 | QC3 | QC4 ) \ QC2

6 END PGM MODEL MM

0 BEGIN PGM 120 MM

1 CC X+75 Y+50

2 LP PR+45 PA+0

3 CP IPA+360 DR+

4 END PGM 120 MM

0 BEGIN PGM 121 MM

...

Selecting an NC program with contour definition

With the SEL CONTOUR function, you select an NC program with contour definitions, from which the control extracts the contour descriptions:

Proceed as follows:

  1. Select Insert NC function
  2. The control opens the Insert NC function window.

  1. Select SEL CONTOUR
  2. The control opens the dialog for entering the contour formula.
  3. Definition of the contour

You can enter contours in the following ways:

Possible setting

Function

File

  • Input
  • File selection

Define the name of the contour or select File Selection

QS

Define the number of a QS parameter

LBL

  • Number
  • Name
  • Parameter

Define the number, name or variable of a label

 
Tip

Programming notes:

  • If the called file is located in the same directory as the file you are calling it from, you can also integrate the file name without the path.
  • Program a SEL CONTOUR block before the SL cycles. Cycle 14 CONTOUR is no longer necessary if you use SEL CONTOUR.

Defining a contour description

Using the DECLARE CONTOUR function in your NC program, you enter the path for NC programs from which the control extracts the contour descriptions. In addition, you can select a separate depth for this contour description.

Proceed as follows:

  1. Select Insert NC function
  2. The control opens the Insert NC function window.

  1. Select DECLARE CONTOUR
  2. The control opens the dialog for entering the contour formula.
  3. Enter the number for the contour designator QC
  4. Defining a contour description

You can enter contours in the following ways:

Possible setting

Function

File

  • Input
  • File selection

Define the name of the contour or select File Selection

QS

Define the number of a QS parameter

 
Tip

Programming notes:

  • With the entered contour designators QC you can include the various contours in the contour formula.
  • If the called file is located in the same directory as the file you are calling it from, you can also integrate the file name without the path.
  • If you program separate depths for contours, then you must assign a depth to all subcontours (assign the depth 0 if necessary).
  • The control will only take different depths (DEPTH) into account if the elements overlap. In case of pure islands inside a pocket, this is not the case. Use a simple contour formula for this purpose.
  • Simple contour formula

Entering a complex contour formula

You can use the contour formula function to interlink various contours in a mathematical formula.

  1. Select Insert NC function
  2. The control opens the Insert NC function window.

  1. Select Contour formula QC
  2. The control opens the dialog for entering the contour formula.
  3. Enter the number for the contour designator QC
  4. Entering a contour formula

Help graphic

Input

Mathematical function

Example

&

Intersected with

QC10 = QC1 & QC2

|

Joined with

QC10 = QC1 | QC2

^

Joined with, but w/o intersection

QC10 = QC1 ^ QC2

\

Without

QC10 = QC1 \ QC2

(

Opening parenthesis

QC10 = QC1 & (QC2 | QC3)

)

Closing parenthesis

QC10 = QC1 & (QC2 | QC3)

Defining a single contour

QC10 = QC1

The control provides the following options to enter formulas:

Superimposed contours

By default, the control considers a programmed contour to be a pocket. With the functions of the contour formula, you can convert a contour from a pocket to an island.

Pockets and islands can be overlapped to form a new contour. You can thus enlarge the area of a pocket by another pocket or reduce it by an island.

Subprograms: overlapping pockets

 
Tip

The following examples are contour description programs that are defined in a contour definition program. The contour definition program is called through the SEL CONTOUR function in the actual main program.

Pockets A and B overlap.

The control calculates the points of intersection S1 and S2 (they do not have to be programmed).

The pockets are programmed as full circles.

Contour description program 1: pocket A

NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.

Change the following contents as needed:

  • Tools
  • Cutting parameters
  • Feed rates
  • Clearance height or safe position
  • Machine-specific positions (e.g., with M91)
  • Paths of program calls

Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.

In addition, test the NC programs using the simulation before the actual program run.

 
Tip

With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.

0 BEGIN PGM POCKET MM

1 L X+10 Y+50 R0

2 CC X+35 Y+50

3 C X+10 Y+50 DR-

4 END PGM POCKET MM

Contour description program 2: pocket B

NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.

Change the following contents as needed:

  • Tools
  • Cutting parameters
  • Feed rates
  • Clearance height or safe position
  • Machine-specific positions (e.g., with M91)
  • Paths of program calls

Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.

In addition, test the NC programs using the simulation before the actual program run.

 
Tip

With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.

0 BEGIN PGM POCKET2 MM

1 L X+90 Y+50 R0

2 CC X+65 Y+50

3 C X+90 Y+50 DR-

4 END PGM POCKET2 MM

Area of inclusion

Both areas A and B are to be machined, including the overlapping area:

  • Areas A and B must have been programmed in separate NC programs without radius compensation.
  • In the contour formula, the areas A and B are processed with the "joined with" function.

Contour definition program:

NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.

Change the following contents as needed:

  • Tools
  • Cutting parameters
  • Feed rates
  • Clearance height or safe position
  • Machine-specific positions (e.g., with M91)
  • Paths of program calls

Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.

In addition, test the NC programs using the simulation before the actual program run.

 
Tip

With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.

* - ...

21 DECLARE CONTOUR QC1 = "POCKET.H"

22 DECLARE CONTOUR QC2 = "POCKET2.H"

23 QC10 = QC1 | QC2

* - ...

Area of exclusion

Area A is to be machined without the portion overlapped by B:

  • Surfaces A and B must be have been programmed in separate NC programs without radius compensation.
  • In the contour formula, the area B is subtracted from the area A using the without function.

Contour definition program:

NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.

Change the following contents as needed:

  • Tools
  • Cutting parameters
  • Feed rates
  • Clearance height or safe position
  • Machine-specific positions (e.g., with M91)
  • Paths of program calls

Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.

In addition, test the NC programs using the simulation before the actual program run.

 
Tip

With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.

* - ...

21 DECLARE CONTOUR QC1 = "POCKET.H"

22 DECLARE CONTOUR QC2 = "POCKET2.H"

23 QC10 = QC1 \ QC2

* - ...

Area of intersection

Only the area where A and B overlap is to be machined. (The areas covered by A or B alone are to be left unmachined.)

  • Surfaces A and B must be have been programmed in separate NC programs without radius compensation.
  • In the contour formula, the areas A and B are processed with the "intersection with" function.

Contour definition program:

NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.

Change the following contents as needed:

  • Tools
  • Cutting parameters
  • Feed rates
  • Clearance height or safe position
  • Machine-specific positions (e.g., with M91)
  • Paths of program calls

Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.

In addition, test the NC programs using the simulation before the actual program run.

 
Tip

With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.

* - ...

21 DECLARE CONTOUR QC1 = "POCKET.H"

22 DECLARE CONTOUR QC2 = "POCKET2.H"

23 QC10 = QC1 & QC2

* - ...

Machining contours with SL or OCM cycles