Programming possibilities

Path functions

Use the path functions to program contours.

A workpiece contour consists of several contour elements, such as straight lines and circular arcs. You use path functions, such as straight line L, to program tool movements for these contours.

Fundamentals of path functions

Graphical programming

As an alternative to Klartext programming you can program contours graphically in the Contour graphics workspace.

You can create 2D sketches by drawing lines and arcs and then export the contour to an NC program.

You can import existing contours from an NC program for graphical editing.

The Contour graphics workspace

Miscellaneous functions M

You can use miscellaneous functions to control the following actions:

  • Program run (e.g., M0 Program STOP)
  • Machine functions (e.g., M3 Spindle ON clockwise)
  • Contouring behavior of the tool (e.g., M197 Corner rounding)

Miscellaneous Functions

Subprograms and program-section repeats

Subprograms and program-section repeats enable you to program a machining sequence once and then run it as often as necessary.

Program sections that are defined in a label can be directly executed repeatedly as program-section repeats, or can be called as a subprogram at defined locations in the main program.

If you wish to execute a specific NC program section only under certain conditions, you also define this machining sequence as a subprogram.

Within an NC program you can call a separate NC program for execution.

Subprograms and program section repeats with the label LBL

Control structures

Using control structures, you can program the NC program more clearly and with a better structure. The control indents the NC blocks within the control structures. Thus you can see right away where a control structure starts and ends.

Examples of control structures are case analyses and program loops.

You can program case analyses by using IF with a condition and ELSE, for example.

You can program loops by using WHILE, for example, and execute a program section several times.

Control structures

Programming with variables

In an NC program, variables are used as placeholders for numerical values or texts. A numerical value or text is assigned to a variable elsewhere.

In the Q parameter list window, you can see and edit the numerical values and texts of the individual variables.

The Q parameter list window

You can use the variables to program mathematical functions that control program execution or describe a contour.

You can also use variable programming, for example, to save and process measurement results determined by the 3D touch probe during program execution.

Variables: Q, QL, QR, QS parameters and named parameters

CAM programs

You can also optimize and execute externally created NC programs on the control.

You use CAD (Computer-Aided Design) to create geometric models of the workpieces to be produced.

In a CAM system (Computer-Aided Manufacturing) you then define how the CAD model will be produced. You can use an internal simulation to check the resulting tool paths, which are not control-specific.

Using a postprocessor, you can then generate the control- and machine-specific NC program in the CAM system. This results not only in programmable path functions but also LN lines with surface-normal vectors.

Multiple-axis machining

Possible methods for editing

Application

The editing of NC programs refers both to the insertion of NC functions as well as their modification. You can also edit NC programs that you have previously generated with a CAM system and transmitted to the control.

Description of function

You can edit NC programs only in the Editor operating mode and in the MDI application.

 
Tip

In the MDI application you edit only the NC program $mdi.h or $mdi_inch.h.

Inserting NC functions

The control provides the following options to insert NC functions:

  • Inserting an NC function directly with keys or buttons
  • Frequently required NC functions such as path functions can be inserted via keys.

  • As an alternative to the keys, the control offers both the screen keyboard as well as the Keyboard workspace in NC input mode.

  • Virtual keyboard of the control bar

  • Inserting an NC function by selecting it
  • You can select all NC functions from the Insert NC function window.

  • The Insert NC function window

  • Inserting an NC function in Text mode
  • In Text mode, the control offers automatic completion.

  • Text mode

  •  
    Tip

    If Text mode is active, then the Klartext editor toggle switch is located on the left and is dimmed.

Inserting NC functions

Editing NC functions

The control provides the following options to edit NC functions:

  • Editing an NC function in the Klartext editor mode
  • By default, the control opens newly created and syntactically correct NC programs in the Klartext editor mode.

  • Editing an NC function in the Form column
  • The Form column not only shows the syntax elements selected and used, but also all those that can be used for the current NC function.

  • Editing an NC function in Text mode
  • If the control can't automatically correct syntax errors in the NC program, it activates Text mode. You must correct all errors before you can switch to Klartext editor mode.

Editing NC functions

Inserting NC functions

Inserting an NC function directly with keys or buttons

To insert frequently needed NC functions:

    1. Select L
    2. The control creates a new NC block and starts the dialog.
    3. Follow the instructions in the dialog

    Inserting an NC function by selecting it

    To insert a new NC function:

      1. Select Insert NC function
      2. The control opens the Insert NC function window.
      3. Navigate to the desired NC function
      4. The control highlights the selected NC function.

      1. Select Paste
      2. The control creates a new NC block and starts the dialog.
      3. Follow the instructions in the dialog

      Inserting an NC function in Text mode

      To insert an NC function:

      1. Enter any character
      2. The control inserts an NC block.
      3. Depending on the setting of the Autocomplete in text mode toggle switch, the control displays a selection menu with possible syntax initiators.
      4. Settings in the Program workspace

      5. Select the desired syntax initiator
      6. Enter the value as needed
      7. Depending on the setting of the Autocomplete in text mode toggle switch, the control displays a selection menu with possible syntax elements.
      8. Select the desired syntax element

      Editing NC functions

      Editing an NC function in the Klartext editor mode

      To edit an NC function in the Klartext editor mode:

      1. Navigate to the desired NC function
      2. Navigate to the desired syntax element
      3. The control displays alternative syntax elements in the action bar.
      4. Select a syntax element
      5. Define a value, if necessary

      1. Conclude entry (e.g., by pressing END)

      Editing an NC function in the Form column

      If the Klartext editor mode is active, you can also use the Form column.

      To edit an NC function in the Form column:

      1. Navigate to the desired NC function

      1. Show the Form column

      1. Select an alternative syntax element if necessary (e.g., LP instead of L)
      2. If necessary, edit or add the value
      3. If necessary, enter an optional syntax element or select from a list (e.g., miscellaneous function M8)

      1. Complete your input (e.g., with the Confirm button)

      Editing an NC function in Text mode

      To edit an incorrect NC function in Text mode:

      1. The control underscores the faulty syntax element with a jagged red line and shows an information symbol before the NC function (e.g., for FMX instead of FMAX).
      2. Navigate to the desired NC function

      1. Select the information symbol as needed
      2. The control displays the corresponding error description.

      1. Conclude the NC block
      2. The control might open the NC block auto-correction window with a solution proposal.

      1. Apply the proposal to the NC program with Yes or cancel auto-correction

      Inserting an axis value into an NC block

      To enter the value of an axis into an NC block:

      1. Program the NC block up to the desired axis, such as L X+10 Y...

      1. Press the actual position capture key
      2. The control opens the position display of the status overview.
      3. Select the desired value of an axis
      4. The control inserts the value of the selected axis in the NC block.

      Notes

       
      Notice
      Caution: Data may be lost!
      When you edit NC programs outside the Program workspace, you have no control over whether the control will identify the changes. The changes cannot be undone on the control. This means that any such deletion or altering of data is permanent!
      1. Edit NC programs in the Program workspace only
      • In Text mode, the control may not be able to suggest a solution in every case.
      • When you are editing an NC function, use the arrows to navigate left and right to the syntax elements, even within cycles. The up and down arrows search for the same syntax element in the rest of the NC program.
      • Searching for identical syntax elements in different NC blocks

      • If you are editing an NC block and have not yet saved it, the Undo and Redo functions will affect the individual syntax elements of the NC function.
      • Icons on the control's user interface

      • Always write an NC program as if the tool were moving. This makes it irrelevant whether a head axis or a table axis performs the motion.
      • You cannot edit an NC program in the Editor operating mode if this NC program is currently being executed in the Program Run operating mode.
      • In the Klartext editor mode, you can insert line breaks within comments or structuring items.